/* Pricing, plan & billing screens (pricing.html, billing.html, billing_checkout.html).
   Mobile-first; uses the app's theme tokens so light/dark both work. Prefix: .bl-  */

.bl-wrap { max-width: 1120px; margin: 0 auto; padding: 4px 0 40px; }
.bl-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-border);
    padding: 6px 12px; border-radius: 999px; }
.bl-h1 { font-size: clamp(26px, 5vw, 40px); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; margin: 14px 0 10px; color: var(--text); }
.bl-lead { font-size: clamp(15px, 2.4vw, 17px); color: var(--text-muted); max-width: 640px; line-height: 1.55; margin: 0 0 20px; }
.bl-h2 { font-size: clamp(19px, 3vw, 24px); font-weight: 800; letter-spacing: -.01em; margin: 40px 0 6px; color: var(--text); }
.bl-sub { color: var(--text-muted); font-size: 14px; margin: 0 0 16px; line-height: 1.5; }
.bl-muted { color: var(--text-muted); }
.bl-faint { color: var(--text-faint); font-size: 12px; }
.bl-num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.bl-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.bl-card + .bl-card { margin-top: 16px; }
.bl-grid > .bl-card + .bl-card { margin-top: 0; }
.bl-card h3 { font-size: 15px; font-weight: 700; margin: 0 0 4px; color: var(--text); }

.bl-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .bl-grid.two { grid-template-columns: 1.05fr .95fr; align-items: start; } }
@media (min-width: 900px) { .bl-grid.sticky-right > :last-child { position: sticky; top: 84px; } }

/* Buttons */
.bl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
    font: inherit; font-size: 15px; font-weight: 700; border-radius: 12px; border: 1px solid var(--border-2);
    background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none;
    transition: background .15s, border-color .15s, transform .05s; }
.bl-btn:hover { background: var(--bg-2); }
.bl-btn:active { transform: translateY(1px); }
.bl-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bl-btn--primary:hover { background: var(--accent-dim); border-color: var(--accent-dim); }
.bl-btn[disabled], .bl-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.bl-btn--block { width: 100%; }
.bl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* Calculator inputs */
.bl-fields { display: grid; gap: 12px; }
.bl-field label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; font-weight: 700;
    color: var(--text); margin-bottom: 6px; }
.bl-field label small { font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; font-size: 11px; }
.bl-input { position: relative; }
.bl-input span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-weight: 700; pointer-events: none; }
.bl-input input { width: 100%; min-height: 48px; padding: 0 14px 0 32px; font: inherit; font-size: 16px; font-weight: 600; /* 16px stops iOS zoom */
    color: var(--text); background: var(--bg); border: 1px solid var(--border-2); border-radius: 12px; outline: none; font-variant-numeric: tabular-nums; }
.bl-input input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bl-field .bl-hint { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.bl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.bl-chip { min-height: 36px; padding: 0 12px; font: inherit; font-size: 13px; font-weight: 700; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--border-2); background: var(--surface); color: var(--text); }
.bl-chip:hover { border-color: var(--accent); color: var(--accent); }

/* Result panel */
.bl-result .bl-big { font-size: clamp(32px, 7vw, 46px); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; color: var(--text); }
.bl-result .bl-big small { font-size: 14px; font-weight: 600; color: var(--text-muted); letter-spacing: 0; }
.bl-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.bl-pill { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--bg-2); color: var(--text-muted); }
.bl-pill--ok { background: var(--success-soft); color: var(--success); }
.bl-pill--warn { background: #fff7e6; color: #b45309; }
:root[data-theme="dark"] .bl-pill--warn { background: #3a2a0c; color: #fbbf24; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bl-pill--warn { background: #3a2a0c; color: #fbbf24; } }
.bl-rows { border-top: 1px solid var(--border); margin-top: 6px; }
.bl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.bl-row .l { color: var(--text); min-width: 0; }
.bl-row .l small { display: block; color: var(--text-faint); font-size: 12px; }
.bl-row .r { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bl-row.total { font-size: 15px; border-bottom: none; padding-top: 12px; }
.bl-row .neg { color: var(--success); }
.bl-flat { margin-top: 14px; padding: 14px; border-radius: 12px; border: 1px dashed var(--accent-border); background: var(--accent-soft); font-size: 14px; }
.bl-flat b { color: var(--accent); }
.bl-empty { padding: 26px 8px; text-align: center; color: var(--text-muted); font-size: 14px; }
.bl-note { font-size: 12px; color: var(--text-faint); line-height: 1.5; margin-top: 12px; }

/* Rate-card + tiers */
.bl-rates { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .bl-rates { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .bl-rates { grid-template-columns: repeat(3, 1fr); } }
.bl-rate { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 16px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 14px; }
.bl-rate b { display: block; font-size: 15px; color: var(--text); }
.bl-rate small { color: var(--text-muted); font-size: 12px; line-height: 1.4; display: block; margin-top: 2px; }
.bl-rate .pct { font-size: 22px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bl-tiers { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .bl-tiers { grid-template-columns: repeat(3, 1fr); } }
.bl-tier { padding: 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.bl-tier .t { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.bl-tier .v { font-size: 26px; font-weight: 800; margin-top: 4px; color: var(--text); }
.bl-tier .d { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.bl-steps { display: grid; gap: 12px; grid-template-columns: 1fr; counter-reset: s; }
@media (min-width: 720px) { .bl-steps { grid-template-columns: repeat(3, 1fr); } }
.bl-step { padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); counter-increment: s; }
.bl-step::before { content: counter(s); display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%;
    background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 14px; margin-bottom: 8px; }
.bl-step b { display: block; color: var(--text); margin-bottom: 4px; }
.bl-step span { color: var(--text-muted); font-size: 14px; line-height: 1.5; }

.bl-faq details { border: 1px solid var(--border); border-radius: 12px; padding: 0 16px; background: var(--surface); }
.bl-faq details + details { margin-top: 8px; }
.bl-faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; font-size: 15px; color: var(--text); list-style: none; min-height: 44px; }
.bl-faq summary::-webkit-details-marker { display: none; }
.bl-faq summary::after { content: "+"; float: right; color: var(--text-muted); font-size: 20px; line-height: 1; }
.bl-faq details[open] summary::after { content: "–"; }
.bl-faq p { margin: 0 0 14px; color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* Trial card */
.bl-trial { display: grid; gap: 12px; }
.bl-trial .big { font-size: 28px; font-weight: 800; color: var(--text); }
.bl-bar { height: 10px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.bl-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-secondary)); border-radius: 999px; transition: width .4s; }
.bl-banner { padding: 14px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5; margin-bottom: 16px; }
.bl-banner--expired { background: var(--danger-soft); border: 1px solid var(--danger-border); color: var(--danger-dim); }
.bl-banner--info { background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--text); }

/* Plan choice */
.bl-choice { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .bl-choice { grid-template-columns: 1fr 1fr; } }
.bl-opt { position: relative; display: block; cursor: pointer; padding: 16px 16px 16px 48px; border: 1.5px solid var(--border-2); border-radius: 14px; background: var(--surface); }
.bl-opt input { position: absolute; left: 16px; top: 18px; width: 20px; height: 20px; accent-color: var(--accent); }
.bl-opt b { display: block; color: var(--text); font-size: 15px; }
.bl-opt span { display: block; color: var(--text-muted); font-size: 13px; margin-top: 2px; line-height: 1.45; }
.bl-opt .amt { color: var(--text); font-weight: 800; font-size: 17px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.bl-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.bl-opt:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.bl-opt .tag { display: inline-block; font-size: 11px; font-weight: 800; color: var(--success); background: var(--success-soft); padding: 3px 8px; border-radius: 999px; margin: 0 0 6px; }
.bl-opt .tag[hidden] { display: none; }
.bl-opt .amt small { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.bl-seg { display: inline-flex; padding: 4px; background: var(--bg-2); border-radius: 12px; gap: 4px; }
.bl-seg button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-weight: 700; font-size: 14px; color: var(--text-muted); cursor: pointer; }
.bl-seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }

/* Checkout */
.bl-pay { display: grid; gap: 10px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 560px) { .bl-pay { grid-template-columns: repeat(3, 1fr); } }
.bl-pay div { padding: 14px; border: 1px dashed var(--border-2); border-radius: 12px; text-align: center; color: var(--text-faint); font-weight: 700; font-size: 14px; background: var(--bg); }
.bl-pay small { display: block; font-weight: 600; font-size: 11px; margin-top: 2px; }
.bl-locked { text-align: center; padding: 18px 12px; border-radius: 14px; background: var(--bg-2); color: var(--text-muted); font-size: 14px; line-height: 1.55; margin-top: 14px; }
.bl-locked b { color: var(--text); }

@media (max-width: 480px) {
    .bl-card { padding: 14px; border-radius: 14px; }
    .bl-btn { width: 100%; }
    .bl-actions .bl-btn { flex: 1 1 100%; }
    .bl-seg { display: flex; } .bl-seg button { flex: 1; }
}

/* Checkout: on narrow screens show what you pay before how you pay. */
@media (max-width: 899px) { .bl-summary-first > .bl-result { order: -1; } }

/* Paused (post-trial) account: masked amounts */
.bl-mask { font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: .12em; color: var(--text-faint); font-weight: 700; user-select: none; }
.bl-tiles { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .bl-tiles { grid-template-columns: repeat(3, 1fr); } }
.bl-tile { padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.bl-tile span { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.bl-tile b { display: block; margin-top: 6px; font-size: 24px; }
.bl-holds { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.bl-hold { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.bl-hold:last-child { border-bottom: none; }
.bl-hold--head { display: none; background: var(--bg-2); font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.bl-hold .name { min-width: 0; } .bl-hold .name b { display: block; color: var(--text); overflow-wrap: anywhere; }
.bl-hold .name small { color: var(--text-faint); font-size: 12px; }
.bl-hold .hide-sm { display: none; }
@media (min-width: 720px) {
    .bl-hold, .bl-hold--head { grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr; }
    .bl-hold--head { display: grid; }
    .bl-hold .hide-sm { display: inline; }
}
.bl-holdlist { margin: 0; padding-left: 20px; color: var(--text-muted); font-size: 14px; line-height: 1.8; }
