/* ── Layout ── */
#box_blaveclaw {
  margin-top: 32px;
  margin-bottom: 32px;
}

/* ── Hero ── */
#box_hero_row {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 32px;
}
#box_hero_left {
  flex: 1;
}
#box_hero_left h3 {
  margin-bottom: 24px;
}
#box_hero_left > p {
  font-size: 16px;
  color: var(--color-greyMedium);
  margin-bottom: 32px;
  max-width: 620px;
}
#box_hero_left > p:lang(en) {
  font-family: "Plus Jakarta Sans", sans-serif;
}
.bc-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bc-feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--color-greyDark);
}
.bc-feature-list li::before {
  content: "✓";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: var(--color-primaryLight);
  color: var(--color-primary);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

a.bc-example-link {
  display: block;
  font-size: 14px;
  color: var(--color-black);
  text-decoration: underline;
  margin-bottom: 10px;
}
a.bc-example-link:last-of-type {
  margin-bottom: 32px;
}
a.bc-example-link:hover {
  color: var(--color-primary);
}

/* ── Card base ── */
.bc-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.bc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

/* ── Credit card ── */
#box_credit {
  width: 486px;
  padding: 24px;
}
.credit-card-info {
  font-size: 12px;
  color: var(--color-greyMedium);
}
.credit-card-info:not(:empty) {
  border-radius: var(--radius-pill);
  padding: 2px 10px;
}
.balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 24px 16px;
  border: 1px solid var(--color-greyLight);
  border-radius: var(--radius-md);
}
.balance-label {
  font-size: 14px;
  color: var(--color-greyMedium);
}
.balance-amount {
  display: flex;
  gap: 6px;
  align-items: end;
}
.balance-amount h4 {
  line-height: 100%;
  font-variant-numeric: tabular-nums;
}
.balance-amount span {
  line-height: 120%;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-greyMedium);
}
.package-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 20px;
}
.package-btn {
  padding: 11px 0;
  border-radius: var(--radius-md);
  text-align: center;
  background: var(--color-white);
  border: 0;
  color: var(--color-greyMedium);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--motion-fast);
}
.package-btn:hover {
  background: var(--color-greyLight);
  color: var(--color-black);
}
.package-btn.selected {
  background: var(--color-black);
  color: var(--color-white);
}
.package-btn.bc-recommended {
  position: relative;
}
.bc-rec-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--color-primary);
  color: var(--color-pureWhite);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  line-height: 16px;
}

/* ── Auto top-up row ── */
.auto-topup-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.auto-topup-label {
  font-size: 12px;
  color: var(--color-greyDark);
  line-height: 100%;
}
.switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  inset: 0;
  background: var(--color-greyLight);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s;
}
.switch-slider::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: 3px;
  top: 3px;
  background: var(--color-pureWhite);
  border-radius: 50%;
  transition: transform 0.2s;
}
.switch input:checked + .switch-slider {
  background: var(--color-primary);
}
.switch input:checked + .switch-slider::before {
  transform: translateX(14px);
}

.credit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.credit-footer p {
  font-size: 12px;
  color: var(--color-greyMedium);
  margin: 0;
}
#btn_buy_credit {
  margin-left: auto;
  height: 40px;
  padding: 0 24px;
  background: var(--color-primary);
  color: var(--color-white);
  border: 0;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--motion-fast);
}
#btn_buy_credit:hover {
  background: var(--color-primaryDark);
}
#btn_buy_credit:disabled {
  background: var(--color-greyLightMedium);
  cursor: default;
}
#btn_unbind_card {
  font-size: 12px;
  color: var(--color-greyMedium);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
#btn_unbind_card:hover {
  color: var(--color-red);
}

/* ── Bottom row ── */
#box_bottom_row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* ── Instance ── */
#box_instance {
  width: 384px;
  padding: 24px;
}
.status-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  background: var(--color-greyLight);
  color: var(--color-greyMedium);
}
.status-pending {
  background: #dfe9f7;
  color: #6c9de0;
}
.status-installing {
  background: #f7f3dc;
  color: #eac202;
}
.status-running {
  background: #dcedc6;
  color: #76b323;
}

#box_instance label {
  font-size: 14px;
  margin-bottom: 16px;
  display: block;
}
#telegramToken {
  width: 100%;
  height: 44px;
  border: 1px solid var(--color-greyLight);
  border-radius: var(--radius-md);
  padding: 0 12px;
  font-size: 14px;
  color: var(--color-greyDark);
  background: var(--color-pureWhite);
  margin-bottom: 16px;
}
#telegramToken:focus {
  outline: none;
  border-color: var(--color-primary);
}
#telegramToken::placeholder {
  color: var(--color-greyLight);
}
p.token-hint {
  font-size: 12px;
  color: var(--color-greyMedium);
  margin-bottom: 16px;
}
.token-hint a {
  color: var(--color-greyMedium);
}
.token-hint a:hover {
  color: var(--color-black);
}
#btnLaunch {
  width: 100%;
  height: 46px;
  background: var(--color-primary);
  color: var(--color-white);
  border: 0;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--motion-fast);
}
#btnLaunch:hover:not(:disabled) {
  background: var(--color-primaryDark);
}
#btnLaunch:disabled {
  background: var(--color-greyLightMedium);
  cursor: default;
}
a.terminal-link {
  display: block;
  line-height: 40px;
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--color-black);
  background-color: transparent;
  border: 1px var(--color-black) solid;
  text-decoration: none;
  margin-bottom: 16px;
  font-size: 14px;
  transition: all var(--motion-fast);
}
a.terminal-link:hover {
  color: var(--color-white);
  background-color: var(--color-black);
}
#btnTerminate {
  width: 100%;
  height: 40px;
  background: var(--color-redLight);
  color: var(--color-red);
  border: 1px solid var(--color-red);
  border-radius: var(--radius-md);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--motion-fast);
  margin-bottom: 16px;
}
#btnTerminate:hover {
  background: var(--color-red);
  color: var(--color-white);
}
#btnResume {
  width: 100%;
  height: 46px;
  background: var(--color-primary);
  color: var(--color-white);
  border: 0;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
p.stopped-hint {
  font-size: 14px;
  color: var(--color-red);
  text-align: center;
  margin-bottom: 16px;
}
#log {
  font-family: "SF Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
    monospace;
  font-size: 11px;
  color: var(--color-greyMedium);
  margin-top: 16px;
  max-height: 80px;
  overflow-y: auto;
  border: 1px solid var(--color-greyLight);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
#log:empty {
  display: none;
}
.spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: 2px;
}

/* ── Usage ── */
#box_usage {
  flex: 1;
  padding: 24px;
}
#box_usage_inner {
  display: flex;
  gap: 32px;
}
#box_usage_summary {
  flex: 1;
}
#box_usage_history {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.usage-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-greyMedium);
}
#usageSummary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.usage-type-block {
  padding: 16px;
  border: 1px solid var(--color-greyLight);
  border-radius: var(--radius-md);
}
.usage-type-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-black);
}
.usage-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--color-greyMedium);
  padding: 3px 0;
}
.usage-row .val {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-black);
  display: flex;
  align-items: end;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.usage-row .val span {
  font-weight: 400;
  font-size: 10px;
  color: var(--color-greyMedium);
  line-height: 180%;
}
.tx-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-greyLight);
  font-size: 13px;
}
.tx-row:last-child {
  border-bottom: none;
}
.tx-amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tx-amount.pos {
  color: var(--color-green);
}
.tx-row.tx-failed .tx-amount,
.tx-row.tx-failed .tx-type {
  color: var(--color-red);
}
.tx-type {
  color: var(--color-greyMedium);
  margin-left: 8px;
}
.tx-time {
  color: var(--color-greyMedium);
  font-size: 12px;
}
#box_tx_list {
  max-height: 320px;
  overflow-y: auto;
}

/* ── Pricing button ── */
.btn-pricing-info {
  background: none;
  border: 0px;
  color: var(--color-greyMedium);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--motion-fast);
  text-decoration: underline;
}
.btn-pricing-info:hover {
  border-color: var(--color-greyDark);
  color: var(--color-black);
}

/* ── Success Notes ── */
#box_success_note {
  margin-top: 48px;
}
#box_success_note h5 {
  margin-bottom: 24px;
}
/* Negative margin + matching padding give the scroll clip room for the
   card shadows without misaligning the first card with the heading. */
#box_blaveclaw #box_success_note .box_body {
  padding: 8px;
}
/* Notes sit directly on the body — standard card (surface + md shadow).
   Double-id selector outranks the shared chart_note.css rule that loads
   after this file. */
#box_blaveclaw #box_success_note .box_body .note-item {
  background-color: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

/* ── FAQ ── */
#box_faq {
  margin-top: 64px;
}
#box_faq h4 {
  margin-bottom: 32px;
  text-align: center;
}
#box_faq .accordion-item {
  background-color: transparent;
}
#box_faq .accordion-header {
  background-color: transparent;
}
#box_faq .accordion-button {
  line-height: 24px;
  padding: 0;
  margin: 14px 0;
  background-color: transparent;
  color: var(--color-black);
  border: 0;
  box-shadow: none;
  font-size: 16px;
  transition: padding-left 0.5s ease;
}
#box_faq .accordion-button:active,
#box_faq .accordion-button:focus {
  box-shadow: none;
  padding-left: 28px;
}
#box_faq .accordion-button:not(.collapsed) {
  padding-left: 28px;
  border-left: 4px var(--color-black) solid;
}
#box_faq .accordion-button.collapsed {
  padding: 0;
}
#box_faq .accordion-body {
  font-size: 14px;
  color: var(--color-greyMedium);
  padding: 0 32px;
  padding-bottom: 12px;
}
#box_faq .accordion-body a {
  color: var(--color-greyMedium);
}
#box_faq .accordion-body a:hover {
  color: var(--color-black);
}
#box_faq .accordion-button::after {
  background-image: url("/static/img/landing/pricing/icon_arrow.png");
  background-size: 20px;
}
#box_faq .accordion-button:not(.collapsed)::after {
  background-image: url("/static/img/landing/pricing/icon_arrow.png");
  background-size: 20px;
}

#runningState {
  display: flex;
  flex-direction: column;
}

/* ── SSH Access link ── */
a.ssh-access-link {
  display: block;
  font-size: 12px;
  color: var(--color-greyMedium);
  text-decoration: underline;
  margin-top: 8px;
  cursor: pointer;
}
a.ssh-access-link:hover {
  color: var(--color-black);
}

/* ── SSH Modal ── */
#modal_ssh .modal-content {
  width: 360px;
  padding: 24px;
}
.ssh-modal-label {
  font-size: 12px;
  color: var(--color-greyMedium);
  margin-bottom: 8px;
  display: block;
}
.ssh-modal-config-block {
  position: relative;
  border: 1px solid var(--color-greyLight);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 20px;
}
.ssh-modal-config-block pre {
  margin: 0;
  font-size: 13px;
  color: var(--color-black);
  line-height: 1.7;
  white-space: pre;
  background: none;
  padding: 0;
  padding-right: 48px;
}
.ssh-modal-config-block .btn-copy-host {
  position: absolute;
  top: 10px;
  right: 10px;
}
.btn-copy-host {
  flex-shrink: 0;
  height: 28px;
  padding: 0 12px;
  background: var(--color-white);
  color: var(--color-greyDark);
  border: 1px solid var(--color-greyLight);
  border-radius: var(--radius-xs);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--motion-fast);
}
.btn-copy-host:hover {
  border-color: var(--color-black);
  color: var(--color-black);
}
.btn-ssh-download {
  display: block;
  width: 100%;
  height: 40px;
  background: var(--color-black);
  color: var(--color-white);
  border: 0;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--motion-fast);
}
.btn-ssh-download:hover {
  background: var(--color-black);
}

/* ── RDP Manual Connection Info Modal ── */
#modal_rdp .modal-content {
  width: 360px;
  padding: 24px;
}
.rdp-modal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}
.rdp-modal-error {
  font-size: 13px;
  color: var(--color-red);
  line-height: 1.6;
  margin: 0;
}
/* Password row needs two action buttons instead of the single absolute
   copy button the SSH-modal recipe (.ssh-modal-config-block .btn-copy-host)
   defines — group them in a flex wrapper and let each button flow normally */
.rdp-pw-block pre {
  padding-right: 104px;
}
.rdp-pw-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
}
.rdp-pw-actions .btn-copy-host {
  position: static;
}

/* ── Telegram (optional connect on a running machine) ── */
.tg-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
}
.tg-label {
  color: var(--color-greyMedium);
}
/* status carries text, not colour alone (a11y); linked reads trading-green */
.tg-status {
  font-weight: 600;
}
.tg-status[data-state="loading"] {
  color: var(--color-greyMedium);
  font-weight: 400;
}
.tg-status[data-state="unlinked"] {
  color: var(--color-greyMedium);
}
.tg-status[data-state="linked"] {
  color: var(--color-greenText);
}
a.tg-connect-link {
  margin-left: auto;
  color: var(--color-greyMedium);
  text-decoration: underline;
  cursor: pointer;
}
a.tg-connect-link:hover {
  color: var(--color-black);
}

/* ── Connect Telegram Modal ── */
/* Spacing on the --space-* scale, with proximity: intra-group (label→input)
   8px tighter than inter-group gaps (24px between intro / input / button).
   All spacing rules are #modal_telegram-scoped so they out-specify the global
   `p/input/label:lang() { margin: 0 }` reset in main.css (a bare class loses to
   :lang()); this mirrors how #telegramToken relies on ID specificity. */
#modal_telegram .modal-content {
  width: 360px;
  padding: var(--space-32);
}
#modal_telegram .tg-modal-intro {
  font-size: 13px;
  color: var(--color-greyMedium);
  line-height: 1.6;
  margin: 0 0 var(--space-24);
}
#modal_telegram .tg-modal-intro a {
  color: var(--color-greyMedium);
}
#modal_telegram .tg-modal-intro a:hover {
  color: var(--color-black);
}
#modal_telegram .ssh-modal-label {
  margin-bottom: var(--space-8);
}
#modal_telegram .tg-modal-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--color-greyLight);
  border-radius: var(--radius-md);
  padding: 0 12px;
  font-size: 14px;
  color: var(--color-greyDark);
  background: var(--color-pureWhite);
  margin-bottom: var(--space-24);
}
#modal_telegram .tg-modal-input:focus {
  outline: none;
  border-color: var(--color-black);
}
#modal_telegram .tg-modal-input::placeholder {
  color: var(--color-greyLight);
}
#modal_telegram .btn-tg-submit {
  display: block;
  width: 100%;
  height: 44px;
  background: var(--color-primary);
  color: var(--color-pureWhite);
  border: 0;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--motion-fast);
}
#modal_telegram .btn-tg-submit:hover:not(:disabled) {
  background: var(--color-primaryDark);
}
#modal_telegram .btn-tg-submit:disabled {
  background: var(--color-greyLightMedium);
  cursor: not-allowed;
}
#modal_telegram .tg-modal-result {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--color-greyMedium);
  margin: var(--space-16) 0 0;
}
#modal_telegram .tg-modal-result:empty {
  display: none;
}
#modal_telegram .tg-modal-result[data-kind="error"] {
  color: var(--color-redText);
}
#modal_telegram .tg-modal-result[data-kind="success"] {
  color: var(--color-greenText);
}

/* ── RWD ── */
@media (max-width: 1300px) {
  #box_blaveclaw {
    margin-top: 0px;
  }
  #box_hero_row {
    flex-direction: column;
  }
  #box_credit {
    width: 100%;
    order: -1;
  }
  #box_hero_left {
    order: 0;
  }
  /* Onboard keeps headline-first even on mobile */
  .bc-onboard #box_credit {
    order: 1;
  }
  #box_bottom_row {
    flex-direction: column;
  }
  #box_instance {
    width: 100%;
  }
  #box_usage {
    width: 100%;
  }
  #box_usage_inner {
    flex-direction: column;
  }
  .package-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Onboarding steps strip ── */
.bc-onboarding-steps {
  display: flex;
  align-items: flex-start;
  padding: 14px 12px;
  background: var(--color-primaryWash);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}
.bc-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.bc-step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--color-greyLight);
  color: var(--color-greyMedium);
}
.bc-step-done .bc-step-dot {
  background: var(--color-greenLight);
  color: var(--color-greenBlack);
}
.bc-step-active .bc-step-dot {
  background: var(--color-black);
  color: var(--color-pureWhite);
}
.bc-step-label {
  font-size: 11px;
  color: var(--color-greyMedium);
  white-space: nowrap;
  line-height: 1;
}
.bc-step-active .bc-step-label {
  color: var(--color-black);
  font-weight: 600;
}
.bc-step-arrow {
  flex: 1;
  text-align: center;
  color: var(--color-greyLightMedium);
  font-size: 12px;
  margin-top: 6px;
  padding: 0 4px;
}

/* ── Bind success banner ── */
.bc-bind-success-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--color-greenLight);
  border: 1px solid var(--color-green);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--color-greyDark);
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease, padding 0.3s ease,
    margin-bottom 0.3s ease;
}
.bc-bind-success-banner.bc-banner-visible {
  opacity: 1;
  max-height: 80px;
  padding-top: 12px;
  padding-bottom: 12px;
  margin-bottom: 24px;
}
.bc-success-dismiss {
  background: none;
  border: none;
  color: var(--color-greyMedium);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color var(--motion-fast) ease;
}
.bc-success-dismiss:hover {
  color: var(--color-black);
}

/* ── Onboard mode (no card bound — conversion state) ── */
/* Default = onboard so new users get a stable first paint;
   loadCredit() removes .bc-onboard once a bound card is found. */
.bc-head-onboard {
  display: none;
}
.bc-onboard .bc-head-onboard {
  display: inline;
}
.bc-onboard .bc-head-dash {
  display: none;
}
.bc-onboard #cardInfo {
  display: none;
}

.bc-onboarding-steps {
  display: none;
}
.bc-onboard .bc-onboarding-steps {
  display: flex;
}

/* Hide the zero-balance anchor and the dashboard cards pre-bind */
.bc-onboard .balance-row {
  display: none;
}
.bc-onboard #box_bottom_row {
  display: none;
}

/* Centered checkout: one-line headline above the bind card; the marketing
   copy (desc, feature list, install link) is redundant with the unlock
   preview below and stays dashboard-only */
.bc-onboard #box_hero_row {
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.bc-onboard #box_hero_left {
  flex: none;
  text-align: center;
}
.bc-onboard #box_hero_left h3 {
  margin-bottom: 0;
}
.bc-onboard #box_hero_left > p,
.bc-onboard .bc-feature-list,
.bc-onboard .bc-example-link {
  display: none;
}
.bc-onboard #box_unlock h5 {
  text-align: center;
}

/* ── Dashboard mode (card bound) ── */
/* Paying users get a console, not a pitch: drop the marketing bullets,
   keep title + one-liner + install-guide link, centered beside the card */
#box_blaveclaw:not(.bc-onboard) .bc-feature-list {
  display: none;
}
#box_blaveclaw:not(.bc-onboard) #box_hero_row {
  align-items: center;
}
#box_blaveclaw:not(.bc-onboard) #box_hero_left h3 {
  margin-bottom: 12px;
}
#box_blaveclaw:not(.bc-onboard) #box_hero_left > p {
  margin-bottom: 16px;
}

/* Elevate the bind card into the page's single focal point:
   brightest surface on the page + brand glow, no border */
.bc-onboard #box_credit {
  background: var(--color-pureWhite);
  box-shadow: var(--shadow-brand);
}
.bc-onboard #btn_buy_credit {
  width: 100%;
  height: 50px;
  font-size: 16px;
}

.bc-amount-label {
  display: none;
}
.bc-onboard .bc-amount-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-black);
  margin-top: 4px;
}

.bc-estimate {
  display: none;
}
.bc-onboard .bc-estimate {
  display: block;
  font-size: 12px;
  color: var(--color-greyDark);
  margin: -8px 0 16px;
}

.bc-trust {
  display: none;
}
.bc-onboard .bc-trust {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--color-greyMedium);
}
.bc-trust span + span::before {
  content: "·";
  margin-right: 8px;
  color: var(--color-greyLightMedium);
}

.bc-risk-note {
  display: none;
}
.bc-onboard .bc-risk-note {
  display: block;
  text-align: center;
  font-size: 12px;
  color: var(--color-greyMedium);
  margin: 8px 0 0;
}

/* ── Unlock preview (onboard mode only) ── */
#box_unlock {
  display: none;
}
.bc-onboard #box_unlock {
  display: block;
  margin-top: 48px;
}
#box_unlock h5 {
  margin-bottom: 24px;
}
.bc-unlock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.bc-unlock-card {
  background: var(--color-cream);
  border-radius: var(--radius-xl);
  padding: 24px;
}
.bc-unlock-index {
  display: block;
  font-family: "SF Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
    monospace;
  font-size: 12px;
  color: var(--color-greyMedium);
  margin-bottom: 12px;
}
.bc-unlock-card h6 {
  margin-bottom: 8px;
}
.bc-unlock-card p {
  font-size: 13px;
  color: var(--color-greyDark);
  margin: 0;
}
.bc-unlock-docs-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--color-greyMedium);
  text-decoration: underline;
}
.bc-unlock-docs-link:hover {
  color: var(--color-black);
}

@media (max-width: 768px) {
  .bc-unlock-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Highlight pulse (added/removed by JS when launch clicked with 0 balance) ── */
@keyframes bc-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 153, 96, 0);
  }
  40% {
    box-shadow: 0 0 0 5px rgba(255, 153, 96, 0.3);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 153, 96, 0);
  }
}
.bc-highlight-pulse {
  animation: bc-pulse 0.7s ease 2;
}

/* ── CPU throttle warning banner ── */
/* Same reveal mechanics as .bc-bind-success-banner; soft-orange warning tone
   (actionable "hit your limit", not catastrophic). */
.bc-throttle-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  background: var(--color-primaryWash);
  border: 1px solid var(--color-primaryMedium);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--color-greyDark);
  opacity: 0;
  max-height: 0;
  margin-bottom: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease, padding 0.3s ease,
    margin-bottom 0.3s ease;
}
.bc-throttle-banner.bc-banner-visible {
  opacity: 1;
  max-height: 120px;
  padding: 12px 16px;
  margin-bottom: 24px;
}
.bc-throttle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bc-throttle-text strong {
  color: var(--color-black);
  font-weight: 600;
}
.bc-throttle-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.bc-throttle-upgrade {
  height: 34px;
  padding: 0 16px;
  background: var(--color-primary);
  color: var(--color-pureWhite);
  border: 0;
  border-radius: var(--radius-md);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--motion-fast) ease;
}
.bc-throttle-upgrade:hover {
  background: var(--color-primaryDark);
}

/* ── Upgrade button in instance card header ── */
.bc-instance-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-upgrade-plan {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 12px;
  background: none;
  border: 1px solid var(--color-primaryMedium);
  color: var(--color-greyDark);
  font-size: 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--motion-fast) ease, color var(--motion-fast) ease;
}
.btn-upgrade-plan:hover {
  background: var(--color-primaryWash);
  color: var(--color-black);
}

/* ── Upgrade modal ── */
#modal_upgrade .modal-content {
  width: 380px;
  padding: 24px;
}
p.bc-upgrade-warn {
  background: var(--color-primaryWash);
  border: 1px solid var(--color-primaryMedium);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-greyDark);
  margin-bottom: 20px;
}
.bc-upgrade-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bc-upgrade-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--color-greyLight);
  border-radius: var(--radius-md);
  transition: border-color var(--motion-fast) ease;
}
.bc-upgrade-option:hover {
  border-color: var(--color-primaryMedium);
}
.bc-upgrade-option.is-current {
  border-color: var(--color-primary);
  background: var(--color-primaryWash);
}
.bc-upgrade-option.is-lower {
  opacity: 0.55;
}
.bc-upgrade-current-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-greyDark);
  white-space: nowrap;
}
.bc-upgrade-option-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-black);
}
.bc-upgrade-option-specs {
  font-size: 12px;
  color: var(--color-greyMedium);
  margin-top: 2px;
}
.bc-upgrade-option-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.bc-upgrade-option-price {
  font-size: 13px;
  color: var(--color-greyDark);
  white-space: nowrap;
}
.bc-upgrade-option-cta {
  height: 34px;
  padding: 0 16px;
  background: var(--color-primary);
  color: var(--color-pureWhite);
  border: 0;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  transition: background var(--motion-fast) ease;
}
.bc-upgrade-option-cta:hover {
  background: var(--color-primaryDark);
}
.bc-upgrading-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  font-size: 14px;
  color: var(--color-greyDark);
}

/* ── Upgrading in-progress (instance card body) ── */
.bc-upgrading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 28px 16px;
}
.bc-upgrading-spinner {
  width: 2rem;
  height: 2rem;
  border-width: 3px;
  color: var(--color-primary);
}
.bc-upgrading-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-black);
}
.bc-upgrading-sub {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-greyMedium);
  max-width: 360px;
}

/* ── Advanced settings (OS + tier before launch) ── */
/* Summary row under the launch button (replaces the retired unused
   .bc-server-inline row): "Linux · Starter · 1.6 TWD / 小時" + entry link */
.bc-adv-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--color-greyMedium);
}
.bc-adv-summary-val .mono {
  font-size: 12px;
}
.bc-adv-entry {
  background: none;
  border: 0;
  padding: 0;
  font-size: 12px;
  color: var(--color-greyMedium);
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--motion-fast) var(--ease-standard);
}
.bc-adv-entry:hover {
  color: var(--color-black);
}

/* ── Advanced settings modal ── */
#modal_adv .modal-content {
  width: 380px;
  padding: 24px;
}
.bc-adv-section + .bc-adv-section {
  margin-top: 24px; /* 組間 > 組內 */
}
.bc-adv-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-greyDark);
  margin-bottom: 8px;
}

/* OS cards: full-width stacked; selected = black fill, the same selected
   language as the top-up .package-btn. Selection = .is-selected toggled by
   JS (no :has()); the real radio inside stays visually hidden for a11y. */
.bc-adv-os-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bc-adv-os-card {
  display: block;
  position: relative;
  padding: 13px 14px;
  background: var(--color-white);
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin: 0;
  text-align: left;
  transition: background var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}
.bc-adv-os-card:hover {
  background: var(--color-greyLight);
}
.bc-adv-os-card input,
.bc-adv-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
/* 鍵盤導航才顯示 focus ring;滑鼠點選不出現(:focus-within 會連滑鼠點擊都亮框) */
.bc-adv-os-card:has(input:focus-visible),
.bc-adv-option:has(input:focus-visible) {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.bc-adv-os-card.is-selected {
  background: var(--color-black);
}
.bc-adv-os-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.bc-adv-os-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-black);
}
.bc-adv-os-price {
  font-size: 12px;
  color: var(--color-greyDark);
  white-space: nowrap;
  flex-shrink: 0;
}
.bc-adv-os-desc {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-greyMedium);
  margin-top: 4px;
}
.bc-adv-os-card.is-selected .bc-adv-os-name {
  color: var(--color-pureWhite);
}
.bc-adv-os-card.is-selected .bc-adv-os-desc {
  color: var(--color-greyLightMedium);
}
.bc-adv-os-card.is-selected .bc-adv-os-price {
  color: var(--color-white);
}
/* Inline "recommended" pill — the absolute-positioned .bc-rec-badge belongs
   to the package buttons; this one flows inline after the OS name. */
.bc-adv-rec-badge {
  display: inline-block;
  vertical-align: 2px;
  margin-left: 6px;
  padding: 1px 7px;
  background: var(--color-primary);
  color: var(--color-pureWhite);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* Tier rows: option row + radio dot (same pattern as .bc-upgrade-option) */
.bc-adv-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bc-adv-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--color-greyLight);
  border-radius: var(--radius-md);
  cursor: pointer;
  margin: 0;
  background: transparent;
  transition: border-color var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard);
}
.bc-adv-option:hover {
  border-color: var(--color-primaryMedium);
}
.bc-adv-option.is-selected {
  border-color: var(--color-primary);
  background: var(--color-primaryWash);
}
.bc-adv-dot {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1px solid var(--color-greyLightMedium);
  border-radius: 50%;
  position: relative;
  background: var(--color-pureWhite);
}
.bc-adv-option.is-selected .bc-adv-dot {
  border-color: var(--color-primary);
}
.bc-adv-option.is-selected .bc-adv-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--color-primary);
}
.bc-adv-option-info {
  flex: 1;
  min-width: 0;
}
.bc-adv-option-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-black);
}
.bc-adv-option-desc {
  display: block;
  font-size: 12px;
  color: var(--color-greyMedium);
  margin-top: 2px;
}
.bc-adv-option-price {
  font-size: 13px;
  color: var(--color-greyDark);
  white-space: nowrap;
  flex-shrink: 0;
}
/* #modal_adv 提權:landing 全域的 p:lang(en) { margin: 0 } 是 (0,1,1),單 class 壓不過 */
#modal_adv .bc-adv-caption {
  font-size: 12px;
  color: var(--color-greyMedium);
  margin: 14px 2px 0;
}
.bc-adv-confirm {
  width: 100%;
  height: 44px;
  margin-top: 24px;
  background: var(--color-black);
  color: var(--color-white);
  border: 0;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--motion-fast) var(--ease-standard);
}
.bc-adv-confirm:hover {
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  .bc-throttle-banner,
  .bc-adv-entry,
  .bc-adv-os-card,
  .bc-adv-option,
  .bc-adv-confirm {
    transition: none;
  }
}
