/* Billing page. Row-based, hairline layout — one narrative headline, a flat
   status ledger, and only the sections the current account state can act on. */

.page-billing {
  --bl-line: #dcd8cb;
  --bl-line-soft: #e6e3d8;
  --bl-body: #5c594e;
  --bl-quiet: #6f6b5e;
  --bl-faint: #8f8b7c;
  --bl-accent: #d9f25a;
  --bl-live: #7a9a00;
  --bl-idle: #a8a496;
  --bl-alert: #ff6a52;
  --bl-danger: #8a2e20;
}

.page-billing .page-header,
.page-billing .page-main,
.page-billing .page-footer {
  width: min(100% - 40px, 760px);
}

.page-billing .page-header {
  padding: 22px 0;
}

.page-billing .page-nav {
  flex-wrap: nowrap;
  gap: 8px;
}

.billing-brand {
  display: inline-flex;
  align-items: center;
}

.billing-brand-icon {
  display: none;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.billing-language-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 42px;
  padding: 3px;
  border: 1px solid rgb(221, 217, 204);
  border-radius: 999px;
  background: transparent;
  color: #16150f;
  font: inherit;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.billing-language-toggle span {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 11px;
  border-radius: 999px;
}

.billing-language-toggle span.is-active {
  background: rgb(221, 217, 204);
}

.page-billing .billing-nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 124px;
  padding: 12px 14px;
  border: 1px solid rgb(221, 217, 204);
  border-radius: 999px;
  color: #16150f;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.billing-language-toggle:hover,
.page-billing .billing-nav-pill:hover {
  background: rgba(255, 255, 255, 0.56);
  color: #16150f;
}

.page-billing .page-main {
  padding: clamp(26px, 6vw, 52px) 0 0;
}

.page-billing .page-footer {
  margin-top: clamp(42px, 7vw, 64px);
  border-top: 0;
  color: var(--bl-faint);
  font-size: 12.5px;
}

.page-billing .page-footer a {
  color: var(--bl-faint);
  text-decoration: none;
}

.page-billing .page-footer a:hover {
  color: #16150f;
}

@media (max-width: 520px) {
  .page-billing .page-header {
    align-items: center;
    gap: 6px;
  }

  .billing-brand {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
  }

  .billing-brand-text {
    display: none;
  }

  .billing-brand-icon {
    display: block;
  }

  .page-billing .page-nav {
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 6px;
  }

  .page-billing .billing-nav-pill {
    min-width: 0;
    padding: 11px 14px;
  }
}

.bl-eyebrow {
  margin: 0 0 18px;
  color: var(--bl-faint);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-billing .bl-headline {
  max-width: 640px;
  margin: 0 0 16px;
  font-size: clamp(32px, 5.8vw, 54px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.bl-lede {
  max-width: 520px;
  margin: 0;
  color: var(--bl-body);
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.6;
  text-wrap: pretty;
}

/* Trial countdown ------------------------------------------------------- */

.bl-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.bl-progress-track {
  flex: 1 1 auto;
  height: 6px;
  border-radius: 999px;
  background: #e2dfd3;
  overflow: hidden;
}

.bl-progress-fill {
  height: 6px;
  border-radius: 999px;
  background: var(--bl-live);
}

.bl-progress-label {
  flex: 0 0 auto;
  color: var(--bl-quiet);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Status ledger --------------------------------------------------------- */

.bl-rows {
  margin-top: clamp(34px, 6vw, 54px);
  border-top: 1px solid var(--bl-line);
}

.bl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--bl-line-soft);
}

.bl-row-label {
  color: var(--bl-quiet);
  font-size: 15px;
}

.bl-row-value {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.012em;
  text-align: right;
}

.bl-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bl-idle);
}

.bl-dot.is-live {
  background: var(--bl-live);
}

.bl-dot.is-alert {
  background: var(--bl-alert);
}

/* Sections -------------------------------------------------------------- */

.bl-section {
  margin-top: clamp(40px, 7vw, 62px);
}

.bl-section.is-divided {
  padding-top: clamp(28px, 5vw, 40px);
  border-top: 1px solid var(--bl-line);
}

.page-billing .bl-section h2 {
  margin: 0 0 10px;
  font-size: clamp(23px, 3.6vw, 31px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.bl-section-intro {
  max-width: 520px;
  margin: 0 0 24px;
  color: var(--bl-body);
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
}

.bl-fine {
  max-width: 580px;
  margin: 16px 0 0;
  color: var(--bl-quiet);
  font-size: 13.5px;
  line-height: 1.65;
}

.bl-fine strong {
  color: #16150f;
}

.bl-fine a {
  font-weight: 600;
}

.bl-trial-form {
  display: grid;
  gap: 18px;
}

.bl-fields {
  display: grid;
  grid-template-columns: minmax(150px, 0.75fr) minmax(220px, 1.25fr);
  gap: 14px;
}

.bl-field {
  display: grid;
  gap: 7px;
  color: var(--bl-quiet);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bl-field-control {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 13px 14px;
  border: 1px solid var(--bl-line);
  border-radius: 12px;
  background: #fff;
  color: #16150f;
  font: inherit;
  font-size: 16px;
  letter-spacing: normal;
  text-transform: none;
}

.bl-field-control:focus {
  border-color: #7a9a00;
  outline: 3px solid rgba(122, 154, 0, 0.16);
}

.bl-trial-form .bl-btn {
  justify-self: start;
}

.bl-trial-qr {
  width: min(220px, 65vw);
  margin: 0 0 20px;
  padding: 12px;
  border: 1px solid var(--bl-line);
  border-radius: 18px;
  background: #fff;
}

.bl-trial-qr svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Purchase steps -------------------------------------------------------- */

.bl-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 26px;
}

.bl-step {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: none;
  color: #16150f;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.bl-step-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgb(221, 217, 204);
  color: #16150f;
  font-size: 12.5px;
  font-weight: 700;
}

.bl-step.is-active .bl-step-dot {
  background: #16150f;
  color: #d8d5c8;
}

.bl-step.is-done {
  cursor: pointer;
}

.bl-step.is-done:hover .bl-step-label {
  text-decoration: underline;
  text-decoration-color: #b5e326;
  text-underline-offset: 3px;
}

.bl-step-line {
  flex: 1 1 auto;
  height: 1px;
  background: var(--bl-line);
}

/* Plans ----------------------------------------------------------------- */

.bl-plans {
  border: 1px solid var(--bl-line);
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
}

.bl-plan {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  justify-content: space-between;
  padding: clamp(20px, 3.5vw, 26px) clamp(20px, 3.5vw, 28px);
}

.bl-plan + .bl-plan {
  border-top: 1px solid #ebe8dd;
}

.bl-plan-main {
  flex: 1 1 260px;
  min-width: 200px;
}

.bl-plan-name {
  margin: 0 0 5px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.bl-plan-note {
  margin: 0;
  color: var(--bl-quiet);
  font-size: 14.5px;
  line-height: 1.55;
}

/* Payment methods ------------------------------------------------------- */

.bl-methods {
  border: 1px solid var(--bl-line);
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
}

.bl-method {
  display: grid;
  grid-template-columns: 118px 1fr auto;
  gap: 6px 18px;
  align-items: center;
  padding: 22px 26px;
}

.bl-method + .bl-method {
  border-top: 1px solid #ebe8dd;
}

.bl-method-lead {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  line-height: 1;
}

.bl-method-arrow {
  color: var(--bl-faint);
  font-size: 15px;
}

.bl-method-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.bl-card-brands {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bl-card-brand {
  display: block;
  width: 25px;
  height: 25px;
  object-fit: contain;
}

.bl-card-brand.is-visa {
  width: 35px;
}

.bl-card-brand.is-amex {
  width: 29px;
  height: 29px;
}

.bl-recovery {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin: 0 0 20px;
  padding: 16px 20px;
  border: 1px solid #f0b9ad;
  border-radius: 16px;
  background: #fff4f1;
}

.bl-recovery p {
  max-width: 430px;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
}

.bl-recovery p strong {
  display: block;
  margin-bottom: 2px;
}

/* Buttons --------------------------------------------------------------- */

.bl-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.bl-headline + .bl-actions,
.bl-lede + .bl-actions {
  margin-top: 26px;
}

.bl-btn {
  display: inline-block;
  flex: 0 0 auto;
  padding: 13px 24px;
  border: 1px solid #d3cfc2;
  border-radius: 999px;
  background: #fff;
  color: #16150f;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
}

.bl-btn:hover {
  background: #faf9f4;
  color: #16150f;
}

.bl-btn.is-primary {
  border-color: transparent;
  background: var(--bl-accent);
  color: #16150f;
}

.bl-btn.is-primary:hover {
  background: #cbe842;
  color: #16150f;
}

.bl-btn.is-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--bl-quiet);
}

.bl-btn.is-quiet:hover {
  background: #eae7dc;
  color: #16150f;
}

.bl-btn.is-danger {
  border-color: transparent;
  background: transparent;
  color: var(--bl-danger);
}

.bl-btn.is-danger:hover {
  background: #fff1ee;
  color: #712417;
}

.bl-btn.is-danger-solid {
  border-color: transparent;
  background: var(--bl-danger);
  color: #fff;
}

.bl-btn.is-danger-solid:hover {
  background: #712417;
  color: #fff;
}

.bl-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.bl-btn:disabled:hover {
  background: #fff;
}

.bl-btn.is-primary:disabled:hover {
  background: var(--bl-accent);
}

/* Notices --------------------------------------------------------------- */

.bl-notice {
  margin: 0 0 26px;
  padding: 14px 16px;
  border-left: 3px solid var(--bl-idle);
  border-radius: 0 10px 10px 0;
  background: #eeece3;
  color: var(--bl-body);
  font-size: 14.5px;
  line-height: 1.6;
}

.bl-notice strong {
  display: block;
  margin-bottom: 3px;
  color: #16150f;
}

.bl-notice.is-warning {
  border-left-color: #d6a320;
  background: #fff8df;
}

.bl-notice.is-error {
  border-left-color: #b94f3d;
  background: #fff1ee;
  color: #712417;
}

.bl-notice.is-success {
  border-left-color: var(--bl-live);
  background: #f0f8d6;
  color: #345000;
}

.bl-notice.is-working {
  border-left-color: var(--bl-idle);
  background: #eeece3;
}

.bl-section > .bl-notice {
  margin-bottom: 22px;
}

/* Confirmations --------------------------------------------------------- */

.bl-confirm {
  margin-top: 4px;
  padding: 20px 22px;
  border: 1px solid var(--bl-line);
  border-radius: 16px;
  background: #fff;
}

.page-billing .bl-confirm h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.bl-confirm p {
  margin: 0 0 8px;
  color: var(--bl-body);
  font-size: 15px;
  line-height: 1.6;
}

.bl-confirm .bl-actions {
  margin-top: 18px;
}

/* Help accordion -------------------------------------------------------- */

.bl-faq {
  margin-top: clamp(40px, 7vw, 62px);
}

.bl-faq details {
  padding: 18px 0;
  border-top: 1px solid var(--bl-line-soft);
}

.bl-faq details:first-of-type {
  border-top-color: var(--bl-line);
}

.bl-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  list-style: none;
  cursor: pointer;
}

.bl-faq summary::-webkit-details-marker {
  display: none;
}

.bl-faq summary::after {
  color: var(--bl-faint);
  font-weight: 400;
  content: "+";
}

.bl-faq details[open] summary::after {
  content: "–";
}

.bl-faq p {
  max-width: 600px;
  margin: 14px 0 0;
  color: var(--bl-body);
  font-size: 15px;
  line-height: 1.7;
  text-wrap: pretty;
}

.bl-faq code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #e9e6db;
  font-family: ui-monospace, "SF Mono", menlo, monospace;
  font-size: 0.9em;
}

/* Account controls ------------------------------------------------------ */

.bl-account-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.bl-account-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  box-sizing: border-box;
  padding: 0 18px;
  border: 1px solid #c9c5b8;
  border-radius: 999px;
  background: transparent;
  color: #16150f;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.bl-account-pill:hover {
  border-color: #a8a496;
  background: rgba(255, 255, 255, 0.56);
  color: #16150f;
}

/* Loading --------------------------------------------------------------- */

.bl-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 12px;
  border: 3px solid #dcd8cb;
  border-top-color: var(--bl-live);
  border-radius: 50%;
  vertical-align: -3px;
  animation: bl-spin 0.8s linear infinite;
}

@keyframes bl-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 560px) {
  .bl-fields {
    grid-template-columns: 1fr;
  }

  .bl-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .bl-row-value {
    text-align: left;
  }

  .bl-plan .bl-btn {
    width: 100%;
    text-align: center;
  }

  .bl-method {
    grid-template-columns: auto 1fr;
  }

  .bl-method-lead {
    font-size: 20px;
  }

  .bl-method .bl-btn {
    grid-column: 1 / -1;
    justify-self: stretch;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bl-spinner {
    animation: none;
  }
}
