:root {
  --bg: #0a0e14;
  --bg-card: #121820;
  --bg-elevated: #1a2230;
  --border: #2a3548;
  --text: #e8edf5;
  --muted: #8b9bb4;
  --accent: #3dd6c6;
  --accent-dim: #2a9d8f;
  --warn: #f4a261;
  --radius: 12px;
  --font: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.42) transparent;
}
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.32);
  border-radius: 999px;
  border: 1px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(94, 234, 212, 0.48);
  background-clip: padding-box;
}
*::-webkit-scrollbar-corner {
  background: transparent;
}
.pay-modal-panel,
.pay-modal-grid {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.5) rgba(0, 0, 0, 0.15);
}
.pay-modal-panel::-webkit-scrollbar-thumb,
.pay-modal-grid::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.38);
}
.pay-modal-panel::-webkit-scrollbar-thumb:hover,
.pay-modal-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(94, 234, 212, 0.5);
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }
.site-header nav { display: flex; gap: 1.25rem; align-items: center; }
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.site-header nav a:hover,
.site-header nav a.active { color: var(--text); }
.nav-cta {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.nav-cta.active { border-color: var(--accent); color: var(--accent); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.lang-switch a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  min-width: 1.35rem;
  text-align: center;
}
.lang-switch a:hover,
.lang-switch a.active {
  color: var(--accent);
}
.lang-sep {
  color: var(--border);
  user-select: none;
}

.site-main {
  flex: 1;
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.site-footer {
  padding: 1.25rem 1.25rem 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  flex-wrap: wrap;
  width: min(920px, 100%);
  margin: 0 auto;
}
.site-footer .footer-copy {
  margin: 0;
  text-align: left;
}
.site-footer a { color: var(--accent); }

.hero { margin-bottom: 2rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--accent);
  margin: 0 0 0.5rem;
}
.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  line-height: 1.15;
}
.lead { font-size: 1.1rem; color: var(--muted); max-width: 36em; margin: 0 0 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.5rem; }
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.feature-list li {
  padding-left: 1.25rem;
  position: relative;
  color: var(--muted);
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.page-head h1 { margin: 0 0 0.5rem; font-size: 1.75rem; }
.muted { color: var(--muted); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.card-dim { background: var(--bg-elevated); }
.card.center { text-align: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: #041210;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--muted); }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; }

.prose p { margin: 0 0 0.75rem; color: var(--muted); }
.prose strong { color: var(--text); }
.warn { color: var(--warn); }

.buy-pricing-card { margin-bottom: 1.25rem; }
.buy-pricing-heading,
.buy-step-heading {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 600;
}
.pricing-hero { margin-bottom: 1rem; }
.pricing-product-name {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.pricing-price-row { margin: 0.75rem 0 0; }
.pricing-price-row.is-hidden { display: none; }
.pricing-amount {
  margin: 0.15rem 0 0;
  font-size: 1.75rem;
  line-height: 1.2;
}
.pricing-amount strong { color: var(--accent, #2dd4bf); }
.pricing-sub { margin: 0.35rem 0 0; font-size: 0.9rem; }
.pricing-price-vnd {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}
.pricing-price-vnd strong { color: var(--accent, #2dd4bf); }
.checkout-steps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
}
.checkout-step {
  color: var(--muted, #9ca3af);
  font-weight: 600;
}
.checkout-step.is-active { color: var(--accent, #2dd4bf); }
.checkout-step.is-done { color: var(--text, #e8edf4); }
.checkout-step-sep { color: var(--muted, #6b7280); }
.checkout-steps--intl-paddle .checkout-step-sep,
.checkout-steps--intl-paddle #checkout-step-indicator-2 {
  display: none;
}
.checkout-paddle-hint.is-hidden { display: none; }
.checkout-paddle-hint { margin: 0.5rem 0 0; }
.paddle-checkout-card { max-width: 720px; margin: 0 auto 2rem; }
.paddle-checkout-frame {
  min-height: 680px;
  width: 100%;
}
.paddle-checkout-frame iframe {
  width: 100% !important;
  min-height: 680px;
}
.paddle-fallback-box { margin: 1rem 0; padding: 0.75rem; border-radius: 8px; }
.paddle-error-detail { margin: 0.75rem 0; font-size: 13px; word-break: break-word; }
.paddle-error-detail.is-hidden { display: none; }
.paddle-domain-hint { font-size: 13px; margin-bottom: 1rem; }
.paddle-fallback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1rem 0;
}
.paddle-fallback-actions.is-hidden { display: none; }
.paddle-sepay-fallback-form { margin: 0; }
.paddle-brave-hint {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: rgba(244, 162, 97, 0.12);
  border: 1px solid rgba(244, 162, 97, 0.45);
  font-size: 0.92rem;
}
.paddle-brave-hint.is-hidden { display: none; }
.paddle-checkout-frame.is-hidden { display: none; }
.paddle-vn-cta { margin: 0 0 1.25rem; text-align: center; }
.paddle-vn-cta .btn-lg { width: 100%; max-width: 360px; }
.paddle-checkout-minimal { max-width: 480px; margin: 2rem auto; text-align: center; }
.checkout-years-field { margin: 1.25rem 0; }
.checkout-years-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.years-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-elevated, rgba(255, 255, 255, 0.04));
}
.years-btn {
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  background: transparent;
  color: var(--accent, #2dd4bf);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}
.years-btn:hover { background: rgba(45, 212, 191, 0.12); }
.years-input {
  width: 3.5rem;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-right: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: transparent;
  color: var(--text, #e8edf4);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  -moz-appearance: textfield;
}
.years-input::-webkit-outer-spin-button,
.years-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
html.pay-modal-open,
body.pay-modal-open {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}
html.paddle-checkout-open,
body.paddle-checkout-open {
  overflow: hidden !important;
  width: 100%;
  max-width: 100%;
  overscroll-behavior: none;
}
body.paddle-checkout-open .site-header,
body.paddle-checkout-open .site-main,
body.paddle-checkout-open .site-footer {
  max-width: 100%;
  overflow-x: clip;
}
@media (max-width: 720px) {
  body.paddle-checkout-open iframe[src*="paddle"],
  body.paddle-checkout-open iframe[name*="paddle"] {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}
.pay-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 1rem;
  overflow-x: clip;
  box-sizing: border-box;
}
.pay-modal.is-hidden { display: none; }
.pay-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}
/* Compact — QR column is square (width = height) */
.pay-modal-panel {
  position: relative;
  width: 100%;
  max-width: min(900px, 100%);
  box-sizing: border-box;
  height: auto;
  max-height: 88vh;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: #2b2f36;
  color: #e8eaed;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}
.pay-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  z-index: 3;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}
.pay-modal-close:hover { color: #fff; }
.pay-modal-grid {
  display: grid;
  grid-template-columns: 42% 58%;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 auto;
  align-items: stretch;
}
.pay-modal-summary {
  padding: 1.1rem 1.15rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  overflow-y: visible;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.pay-modal-summary h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.pay-modal-product {
  margin: 0;
  font-size: 0.88rem;
  color: #b8bcc4;
  line-height: 1.35;
}
.pay-modal-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.1rem 0;
}
.pay-modal-qty-label {
  font-size: 0.82rem;
  color: #9ca3af;
}
.years-stepper--modal {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 7px;
}
.years-stepper--modal .years-btn {
  width: 1.85rem;
  height: 1.85rem;
  font-size: 1rem;
  color: #5eead4;
}
.years-stepper--modal .years-btn:hover {
  background: rgba(94, 234, 212, 0.12);
}
.years-stepper--modal .years-input {
  width: 2.35rem;
  font-size: 0.88rem;
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  background: transparent;
}
.pay-modal-due {
  margin: 0.05rem 0 0.2rem;
  font-size: 0.9rem;
  color: #d1d5db;
}
.pay-modal-due-amt {
  color: #5eead4;
  font-size: 1.05rem;
}
.pay-modal-due-was {
  color: #6b7280;
  text-decoration: line-through;
  font-size: 0.85rem;
  margin-right: 0.35rem;
}
.pay-modal-discount {
  margin: 0.05rem 0 0.15rem;
}
.pay-modal-discount-toggle {
  border: none;
  background: none;
  padding: 0;
  color: #5eead4;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
}
.pay-modal-discount-toggle:hover { color: #99f6e4; }
.pay-modal-discount-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
  align-items: center;
  max-width: 100%;
}
.pay-modal-discount-form.is-hidden { display: none; }
.pay-modal-discount-input {
  flex: 1;
  min-width: 0;
  padding: 0.38rem 0.5rem !important;
  font-size: 0.85rem !important;
}
.pay-modal-discount-form .btn-sm {
  padding: 0.38rem 0.65rem;
  font-size: 0.82rem;
  white-space: nowrap;
}
.pay-modal-discount-msg {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: #fca5a5;
}
.pay-modal-discount-msg.is-hidden { display: none; }
.pay-modal-discount-msg.is-ok { color: #5eead4; }
.pay-modal-email-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: #9ca3af;
}
.pay-modal-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.42rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
}
.pay-modal-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}
.pay-modal-email-err {
  margin: 0;
  font-size: 0.8rem;
  color: #fca5a5;
}
.pay-modal-email-err.is-hidden { display: none; }
.pay-modal-bank {
  margin: 0.15rem 0 0;
  font-size: 0.74rem;
}
.pay-modal-bank dt {
  color: #9ca3af;
  font-size: 0.68rem;
  text-transform: uppercase;
  margin-top: 0.35rem;
}
.pay-modal-bank dt:first-child { margin-top: 0; }
.pay-modal-bank dd {
  margin: 0.1rem 0 0;
  color: #e5e7eb;
}
.pay-modal-bank code {
  color: #5eead4;
  font-size: 0.74rem;
  background: transparent;
  padding: 0;
  word-break: break-all;
  overflow-wrap: anywhere;
}
.pay-modal-bank dd {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.pay-modal-wait,
.pay-modal-due {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.pay-modal-wait {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  color: #9ca3af;
  line-height: 1.32;
}
.pay-modal-wait.is-hidden { display: none; }
.pay-modal-wait a { color: #5eead4; }
.pay-modal-qr-pane {
  position: relative;
  min-height: 0;
  width: 100%;
  aspect-ratio: 1;
  background: #fff;
  overflow: hidden;
  border-radius: 0 10px 0 0;
}
.pay-modal-qr-inner {
  position: absolute;
  inset: 0;
  line-height: 0;
  padding: 0;
  margin: 0;
}
.pay-modal-qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #fff;
}
.pay-modal-qr-placeholder,
.pay-modal-qr-err {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
  max-width: 220px;
}
.pay-modal-qr-err { color: #b91c1c; }
.pay-modal-qr-block {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  align-self: start;
  box-sizing: border-box;
}
.pay-modal-qr-download {
  display: block;
  flex: 0 0 auto;
  margin: 0;
  padding: 0.45rem 1rem 0.65rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 500;
  color: #9ca3af;
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.pay-modal-qr-download:hover { color: #5eead4; text-decoration: underline; }
.pay-modal-qr-download.is-hidden { display: none; }
@media (min-width: 721px) {
  .pay-modal-qr-download {
    display: none !important;
  }
  .pay-modal-qr-pane {
    border-radius: 0 10px 10px 0;
  }
}
@media (max-width: 720px) {
  .pay-modal {
    padding: 0;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
  }
  .pay-modal-panel {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100dvh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .pay-modal-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    flex: none;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    min-width: 0;
    overflow-x: clip;
  }
  .pay-modal-summary {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: clip;
    overflow-y: visible;
    max-height: none;
  }
  .pay-modal-qr-block {
    flex: 0 0 auto;
    flex-shrink: 0;
    padding: 0 max(0.75rem, env(safe-area-inset-right, 0px))
      max(1rem, env(safe-area-inset-bottom, 0px))
      max(0.75rem, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .pay-modal-qr-pane {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    min-height: 0;
    flex-shrink: 0;
    border-radius: 8px;
  }
  .pay-modal-qr-inner {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .pay-modal-qr-placeholder,
  .pay-modal-qr-err {
    max-width: none;
    width: 100%;
  }
  .pay-modal-qr-download {
    margin: 0.5rem max(0.75rem, env(safe-area-inset-right, 0px))
      max(1rem, env(safe-area-inset-bottom, 0px))
      max(0.75rem, env(safe-area-inset-left, 0px));
    padding: 0.55rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #5eead4;
    border-top: none;
    background: rgba(94, 234, 212, 0.12);
    border: 1px solid rgba(94, 234, 212, 0.35);
    border-radius: 8px;
  }
}
@media (max-width: 720px) {
  .site-main {
    overflow-x: hidden;
    max-width: 100%;
  }
  .card {
    max-width: 100%;
    overflow-x: hidden;
  }
}
.checkout-step-panel.is-hidden { display: none; }
.checkout-email-field { margin-bottom: 0.35rem; }
.checkout-email-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
}
.buy-checkout-email {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: var(--bg-elevated, rgba(255, 255, 255, 0.04));
  color: var(--text, #e8edf4);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.buy-checkout-email::placeholder { color: var(--muted, #6b7280); }
.buy-checkout-email:hover {
  border-color: rgba(45, 212, 191, 0.35);
}
.buy-checkout-email:focus {
  outline: none;
  border-color: var(--accent, #2dd4bf);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.2);
}
.checkout-email-hint { margin: 0.35rem 0 1rem; }
.checkout-email-hint.is-hidden { display: none; }
#btn-checkout-continue { margin-top: 0.25rem; }
.checkout-confirmed-line {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}
.checkout-confirmed-line strong { color: var(--text); }
.text-btn {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.88rem;
  color: var(--accent, #2dd4bf);
  cursor: pointer;
  text-decoration: underline;
}
.checkout-step2-lead {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--muted, #9ca3af);
}
.checkout-pay-pane.is-hidden { display: none; }
.vn-qr-mount { margin: 0; padding: 0; border: none; }
.pay-active-box {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.pay-active-box.is-hidden { display: none; }
#email-hint.is-hidden { display: none; }
.pay-panel-title { margin: 0 0 1rem; font-size: 1rem; }
.buy-page-legal { text-align: center; margin: 1rem 0 2rem; font-size: 0.85rem; }
.buy-page-legal a { color: var(--accent, #2dd4bf); }
.pricing-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted, #9ca3af);
  margin-bottom: 0.15rem;
}
.pricing-features { margin: 0.75rem 0 0; }
.pricing-legal { margin: 1rem 0 0; font-size: 0.85rem; }
.pricing-legal a { color: var(--accent, #2dd4bf); }
.legal-prose h2 { font-size: 1rem; margin: 1.25rem 0 0.5rem; }
.legal-prose h2:first-child { margin-top: 0; }
.legal-prose ul { padding-left: 1.25rem; }
.site-footer .footer-legal {
  margin: 0 0 0 auto;
  text-align: right;
  white-space: nowrap;
}
.site-footer .footer-legal a { color: var(--muted, #9ca3af); }
.site-footer .footer-legal a:hover { color: var(--accent, #2dd4bf); }
@media (max-width: 640px) {
  .site-footer .footer-legal {
    white-space: normal;
    width: 100%;
    text-align: right;
  }
}
.pay-mode-switch {
  display: inline-flex;
  gap: 0.35rem;
  margin: 1rem 0 1.25rem;
  padding: 0.25rem;
  background: var(--bg-elevated, rgba(255, 255, 255, 0.06));
  border-radius: 10px;
  border: 1px solid var(--border);
}
.pay-mode-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
}
.pay-mode-btn.active {
  background: var(--accent, #2dd4bf);
  color: #0b1218;
}
.pay-mode-btn:hover:not(.active) {
  color: var(--text, #e8edf4);
}
.pay-panel.is-hidden {
  display: none;
}
.payment-panel-inline {
  margin: 0;
  padding: 0;
  border: none;
}
.payment-panel-inline h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
}
.vn-qr-mount .pay-grid { margin-top: 0; }
.buy-form label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.9rem; }
.buy-form input[type="email"] {
  width: 100%;
  max-width: 400px;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.hint { font-size: 0.85rem; color: var(--muted); margin: 0.5rem 0 1rem; }
.hint code {
  background: var(--bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent);
}
.pay-methods { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.pay-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-top: 1rem;
}
@media (max-width: 560px) {
  .pay-grid { grid-template-columns: 1fr; justify-items: center; }
}
.qr-wrap {
  background: #fff;
  padding: 12px;
  border-radius: 8px;
}
.bank-dl { margin: 0; }
.bank-dl dt { font-size: 0.75rem; text-transform: uppercase; color: var(--muted); margin-top: 0.75rem; }
.bank-dl dt:first-child { margin-top: 0; }
.bank-dl dd { margin: 0.2rem 0 0; }
.bank-dl code { color: var(--accent); }
.buy-email-hint {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(244, 162, 97, 0.08);
  border: 1px solid rgba(244, 162, 97, 0.35);
}

/* Admin */
.admin-wrap {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.admin-nav {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.admin-nav a { color: var(--accent); text-decoration: none; font-size: 0.9rem; }
.admin-form label { display: block; margin: 1rem 0 0.35rem; font-weight: 600; font-size: 0.85rem; }
.admin-form input,
.admin-form textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}
.admin-form textarea { min-height: 100px; resize: vertical; }
.flash-ok {
  background: rgba(61, 214, 198, 0.12);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.flash-err {
  background: rgba(255, 120, 120, 0.12);
  border: 1px solid #c44;
  color: #f3a8a8;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.login-card { max-width: 380px; margin: 4rem auto; }

.admin-wrap.admin-wide { max-width: 1280px; }
.admin-licenses-section { margin-bottom: 1.25rem; }
.admin-licenses-section .section-label {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}
.env-strip {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 1rem;
  line-height: 1.5;
}
.env-strip .ok { color: var(--accent); }
.env-strip .bad { color: #f3a8a8; }
.env-strip code { font-size: 0.75rem; }

.admin-row-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  margin-bottom: 0.5rem;
}
.admin-row-form input,
.admin-row-form select {
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
}
.admin-row-form .col-email { flex: 1 1 140px; min-width: 120px; }
.admin-row-form .col-key-wrap {
  flex: 1 1 300px;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.admin-row-form .col-key-full {
  flex: 1 1 auto;
  min-width: 0;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.68rem;
  cursor: text;
}
.admin-row-form .col-dates {
  flex: 0 0 130px;
  font-size: 0.72rem;
  line-height: 1.3;
}
.admin-row-form .col-fp { flex: 1 1 100px; min-width: 80px; }
.admin-row-form .col-notes { flex: 1 1 80px; min-width: 60px; }
.admin-row-form .col-sm { flex: 0 0 72px; }
.admin-row-form .col-days { flex: 0 0 64px; }
.admin-row-form .col-status { flex: 0 0 52px; }
.btn-compact { padding: 0.35rem 0.65rem; font-size: 0.8rem; }
.license-grid-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
  padding: 0 0.25rem;
}
.license-grid-head span:nth-child(1) { flex: 1 1 300px; min-width: 220px; }
.license-grid-head span:nth-child(2) { flex: 1 1 140px; }
.license-grid-head span:nth-child(3) { flex: 0 0 130px; }
.license-grid-head span:nth-child(4) { flex: 1 1 100px; }
.license-grid-head span:nth-child(5) { flex: 1 1 80px; }
.license-grid-head span:nth-child(6) { flex: 0 0 52px; }
.license-grid-head span:nth-child(7) { flex: 0 0 52px; }
.license-row { padding: 0.25rem 0; border-bottom: 1px solid var(--border); }
.license-row:last-of-type { border-bottom: none; }
.fine-print { font-size: 0.72rem; margin: 0.75rem 0 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.admin-notice {
  background: rgba(244, 162, 97, 0.1);
  border: 1px solid var(--warn);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}
.admin-notice a { color: var(--accent); }

.redirect-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  color: var(--muted);
}
.install-notes {
  margin-top: 10px;
}

/* Download page — policy + consent */
.download-card {
  padding: 0;
  overflow: hidden;
  border-color: rgba(61, 214, 198, 0.22);
  background: linear-gradient(165deg, var(--bg-card) 0%, rgba(26, 34, 48, 0.95) 100%);
}
.policy-details { margin: 0; }
.policy-summary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 1.25rem;
  transition: background 0.15s ease;
}
.policy-summary::-webkit-details-marker { display: none; }
.policy-summary:hover { background: rgba(255, 255, 255, 0.03); }
.policy-summary-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: rgba(61, 214, 198, 0.12);
  border: 1px solid rgba(61, 214, 198, 0.28);
  position: relative;
}
.policy-summary-icon::after {
  content: "";
  position: absolute;
  inset: 0.55rem 0.7rem;
  border: 2px solid var(--accent);
  border-radius: 3px;
  opacity: 0.85;
}
.policy-summary-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.policy-summary-title {
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.policy-summary-hint {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
}
.policy-chevron {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  margin-right: 0.25rem;
  transition: transform 0.2s ease;
  opacity: 0.7;
}
.policy-details[open] .policy-chevron {
  transform: rotate(-135deg);
  margin-top: 0.35rem;
}
.policy-details[open] .policy-summary-hint { opacity: 0; height: 0; overflow: hidden; }
.policy-body {
  padding: 0.94rem 1.25rem 1.15rem 4.1rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--muted);
  border-top: 1px solid var(--border);
  animation: policyFade 0.25s ease;
}
@keyframes policyFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.policy-body p {
  margin: 0 0 0.85rem;
}
.policy-body p:last-child { margin-bottom: 0; }
.policy-lead { color: var(--text); font-size: 0.94rem; margin-top: 0.94rem;}
.policy-safe {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(61, 214, 198, 0.06);
  border-left: 3px solid var(--accent-dim);
  color: var(--text);
}
.policy-safe strong { color: var(--accent); font-weight: 600; }
.policy-foot {
  font-size: 0.88rem;
  color: var(--muted);
}
.policy-foot a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.policy-foot a:hover {
  color: var(--text);
}
.policy-body a:not(.btn) {
  color: var(--accent);
  font-weight: 500;
}
.policy-body a:not(.btn):hover {
  color: var(--text);
}
.download-consent-panel {
  padding: 1.15rem 1.25rem 1.25rem;
  background: rgba(0, 0, 0, 0.18);
  border-top: 1px solid var(--border);
}
.consent-form { margin: 0; }
.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
  padding: 0.65rem 0.35rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}
.consent-check:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
}
.consent-check input {
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}
.btn-download {
  width: 100%;
  max-width: 22rem;
  box-shadow: 0 4px 20px rgba(61, 214, 198, 0.2);
}
.download-unavailable {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: rgba(244, 162, 97, 0.08);
  border: 1px solid rgba(244, 162, 97, 0.35);
  color: var(--warn);
  font-size: 0.92rem;
  line-height: 1.55;
}
.download-unavailable a { color: var(--accent); }

/* Download page — collapsible guides */
.guide-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}
.guide-details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.guide-details .policy-summary {
  padding: 0.95rem 1.15rem;
}
.guide-details .policy-body {
  padding: 0.94rem 1.15rem 1rem 3.85rem;
  border-top: 1px solid var(--border);
}
.guide-icon-install::after { border-color: var(--accent); opacity: 0.9; }
.guide-icon-use::after {
  border: none;
  inset: 0.5rem;
  background: var(--accent);
  opacity: 0.35;
  border-radius: 2px;
}
.guide-icon-excel::after {
  content: "X";
  border: none;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.95;
}
.guide-steps {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.65;
}
.guide-steps li { margin-bottom: 0.55rem; }
.guide-steps li:last-child { margin-bottom: 0; }
.guide-admin-notes {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border);
  font-size: 0.88rem;
}
.guide-notes-label {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.guide-admin-notes.prose a {
  color: var(--accent);
  font-weight: 500;
}
.placeholder-table-wrap {
  overflow-x: auto;
  margin: 0.5rem 0 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.placeholder-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.placeholder-table th,
.placeholder-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.placeholder-table th {
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.placeholder-table tbody tr:last-child td { border-bottom: none; }
.placeholder-table code {
  font-size: 0.8rem;
  color: var(--accent);
  white-space: nowrap;
}
.card-compact {
  padding: 1rem 1.25rem;
  text-align: center;
}

@media (max-width: 520px) {
  .policy-body { padding-left: 1.25rem; }
  .guide-details .policy-body { padding-left: 1.15rem; }
}
.flash-err {
  color: #ffb4b4;
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 120, 120, 0.35);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.machines-table-wrap { overflow-x: auto; margin-top: 0.75rem; }
.machines-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.machines-table th,
.machines-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.machines-table th {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.machines-table .fp-cell { font-size: 0.72rem; }
.usage-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}
.usage-active { background: rgba(61, 214, 198, 0.15); color: var(--accent); }
.usage-inactive { background: rgba(244, 162, 97, 0.15); color: var(--warn); }
.usage-likely_removed { background: rgba(139, 155, 180, 0.2); color: var(--muted); }
.env-strip .ok { color: var(--accent); }
.env-strip .bad { color: #f3a8a8; }
