/*! StiffStruct, (c) 2026 Mohammad Asad. All rights reserved. Proprietary: copying, mirroring or reusing this code is not permitted without written permission (see terms.html#intellectual-property). build 20261018-2109 */
/* StiffStruct billing: plan badge, Upgrade button, trial banner, account-menu plan block, upgrade cards / pages, test-mode simulator.
 * Uses only design tokens (css/tokens.css): follows light / dark and high / normal contrast. Pairs with css/auth.css. */

/* --- header ---------------------------------------------------------------------------------- */
.bl-slot { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.bl-slot:empty { display: none; }
.bl-plan { white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.bl-upgrade { flex: none; text-decoration: none; font-weight: 600; white-space: nowrap; }
a.bl-upgrade:hover { text-decoration: none; }
@media (max-width: 600px) {
  /* the header is full on a phone: the plan is in the account menu, the "More" menu and the banner instead */
  .bl-slot { display: none; }
}

/* --- trial banner (fixed under the mode bar, never moves the layout) ------------------------- */
.bl-banner {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  top: calc(var(--header-h, 52px) + var(--modebar-h, 48px) + 8px);
  width: min(680px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px;
  background: var(--bg-elev); color: var(--fg); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow-2), inset 3px 0 0 var(--info);
  font-size: 13px; line-height: 1.45;
}
.bl-banner[hidden] { display: none; }
.bl-banner-ic { color: var(--info); display: inline-flex; flex: none; }
.bl-banner-msg { flex: 1 1 auto; min-width: 0; }
.bl-banner .btn { flex: none; }
@media (max-width: 600px) {
  .bl-banner { flex-wrap: wrap; row-gap: 6px; }
  .bl-banner-msg { flex-basis: calc(100% - 80px); }
}
@media print { .bl-banner { display: none !important; } }

/* --- account popover / test panel ------------------------------------------------------------ */
.bl-acct { display: grid; gap: 10px; padding: 10px 12px 4px; }
.bl-acct-plan, .bl-portal-plan { display: grid; gap: 2px; }
.bl-acct-k { font-size: 11px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-muted); }
.bl-acct-plan strong, .bl-portal-plan strong { font-size: 14px; color: var(--fg); }
.bl-acct-sub { font-size: 12px; line-height: 1.4; color: var(--fg-muted); white-space: normal !important; overflow: visible !important; }
.bl-acct-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bl-acct-actions a.btn { text-decoration: none; justify-content: center; }
.bl-test { display: grid; gap: 8px; padding: 10px; margin: 0 -2px 8px; border-radius: var(--radius); background: var(--warning-soft); }
.bl-test-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 650; color: var(--fg); }
.bl-test-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.bl-test-grid .btn { justify-content: center; padding-inline: 6px; font-size: 12px; }

/* --- upgrade card (extends .au-locked from auth.css) ----------------------------------------- */
.bl-upgrade-card .au-locked-actions a.btn { text-decoration: none; }
.bl-upgrade-card { box-shadow: inset 3px 0 0 var(--accent); }

/* --- report / code upgrade page -------------------------------------------------------------- */
.bl-page { align-content: start; }
.bl-page-card .au-locked-actions a.btn { text-decoration: none; }
.bl-fine { margin: 0; font-size: 12px; color: var(--fg-muted); line-height: 1.45; }
.bl-preview { width: min(560px, 100%); margin: 18px auto 0; padding: 16px 18px 6px; position: relative; overflow: hidden; }
.bl-preview-k { font-size: 11px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fg-muted); }
.bl-preview-h { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 10px; font-size: 17px; color: var(--fg); }
.bl-preview-n { color: var(--accent-text); font-variant-numeric: tabular-nums; }
.bl-preview-t { width: 100%; font-size: 13px; }
.bl-preview-t th { width: 34%; text-align: left; font-weight: 600; color: var(--fg-muted); position: static; background: transparent; white-space: normal; }
.bl-preview-t td { color: var(--fg); overflow-wrap: anywhere; }
.bl-preview-rest { margin: 14px 0 0; padding: 14px 0 14px 26px; border-top: 1px dashed var(--border-strong); display: grid; gap: 6px; color: var(--fg-muted); font-size: 14px; max-height: 150px; overflow: hidden; user-select: none;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%); mask-image: linear-gradient(to bottom, black 0%, transparent 100%); filter: blur(1.4px); }

/* --- test portal dialog ---------------------------------------------------------------------- */
.bl-portal { display: grid; gap: 14px; }
.bl-portal-test { margin: 0; padding: 9px 11px; border-radius: var(--radius); background: var(--warning-soft); color: var(--fg); font-size: 12.5px; line-height: 1.5; }
.bl-portal-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bl-portal-switch { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.bl-portal-switch label { display: grid; gap: 4px; flex: 1 1 200px; }
.bl-portal-switch .select { width: 100%; }

/* --- report title block of Pro / Lifetime (Prepared by) -------------------------------------- */
.rv-prepared { margin:.5rem 0 0;font-size:15px;color:var(--fg) }
.rv-prepared-k { margin-right:.45em;font-size:.78em;letter-spacing:.06em;text-transform:uppercase;color:var(--fg-muted) }

