/* ==========================================================================
   Licensing UI — tier badge, unlock modal, pricing page
   ========================================================================== */

.tier-badge {
  padding: 3px 10px;
  font-size: 11px; font-weight: 510;
  letter-spacing: -0.13px;
  color: var(--warn);
  background: rgba(245,165,36,0.10);
  border: 1px solid rgba(245,165,36,0.30);
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.tier-badge.is-full {
  color: var(--ok);
  background: rgba(16,185,129,0.10);
  border-color: rgba(16,185,129,0.32);
}

/* ---------- modal ---------- */

.modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(0,0,0,0.85);
}
.modal[hidden] { display: none; }

.modal-card {
  width: 100%; max-width: 460px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: rgba(0,0,0,0.5) 0 12px 40px, rgba(0,0,0,0.3) 0 2px 8px;
}

.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
}
.modal-head h2 {
  font-size: 20px; font-weight: 590; letter-spacing: -0.24px; color: var(--ink);
}

.modal-body {
  font-size: 14px; line-height: 1.6; color: var(--ink-3);
  margin-bottom: 18px;
}

.key-input {
  width: 100%;
  padding: 11px 13px;
  font-family: var(--mono); font-size: 16px; letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--sheen-1);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.key-input::placeholder { color: var(--ink-4); letter-spacing: 0.06em; }
.key-input:focus {
  outline: none;
  border-color: var(--accent-hi);
  background: rgba(94,106,210,0.08);
}

.modal-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 16px;
}
.modal-actions .btn { flex: 1 1 auto; text-decoration: none; }

.modal-foot {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px; color: var(--ink-4); line-height: 1.5;
}

/* ---------- auth: tabs and text fields ---------- */

.tabs {
  display: flex; gap: 4px;
  padding: 3px;
  margin-bottom: 16px;
  background: var(--sheen-1);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.tab {
  flex: 1;
  padding: 7px 10px;
  font-family: inherit; font-size: 13px; font-weight: 510;
  letter-spacing: -0.13px;
  color: var(--ink-3);
  background: transparent;
  border: 0; border-radius: calc(var(--r) - 3px);
  cursor: pointer;
  transition: background 90ms ease, color 90ms ease;
}
.tab:hover { color: var(--ink); }
.tab.is-active {
  color: var(--ink);
  background: var(--sheen-3);
  box-shadow: rgba(0,0,0,0.25) 0 1px 2px;
}

.text-input {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit; font-size: 15px;
  color: var(--ink);
  background: var(--sheen-1);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.text-input::placeholder { color: var(--ink-4); }
.text-input:focus {
  outline: none;
  border-color: var(--accent-hi);
  background: rgba(94,106,210,0.08);
}

.label-opt { color: var(--ink-4); font-weight: 400; }

.acct-line {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-3);
  margin-top: 4px;
}
.acct-email {
  font-family: var(--mono); font-size: 11.5px;
  color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 100%;
}

.or-line {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0 12px;
  font-size: 12px; color: var(--ink-4);
}
.or-line::before, .or-line::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* ---------- pricing page ---------- */

.pricing-wrap { max-width: 940px; margin: 0 auto; padding: 32px 24px 80px; }

.pricing-head { margin-bottom: 28px; }
.pricing-head h1 {
  font-size: 32px; font-weight: 510; line-height: 1.13;
  letter-spacing: -0.704px; color: var(--ink);
}
.pricing-head p {
  margin-top: 8px; font-size: 15px; color: var(--ink-3); max-width: 68ch;
}

.plans {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.plan {
  display: flex; flex-direction: column;
  padding: 20px;
  background: var(--sheen-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.plan.is-featured {
  border-color: var(--accent-hi);
  background: rgba(94,106,210,0.08);
}

.plan-name {
  font-size: 11px; font-weight: 510; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink-4);
}
.plan-price {
  display: flex; align-items: baseline; gap: 5px;
  margin: 8px 0 4px;
}
.plan-amount {
  font-family: var(--mono); font-size: 34px; font-weight: 500;
  letter-spacing: -1px; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.plan-unit { font-size: 13px; color: var(--ink-4); }
.plan-note { font-size: 12.5px; color: var(--ink-3); min-height: 34px; }

.plan-features {
  list-style: none;
  margin: 14px 0 18px;
  display: flex; flex-direction: column; gap: 7px;
}
.plan-features li {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 13.5px; line-height: 1.5; color: var(--ink-2);
}
.plan-features li::before {
  content: "✓"; flex: none;
  color: var(--ok); font-weight: 590; font-size: 12px; line-height: 1.6;
}
.plan-features li.is-off { color: var(--ink-4); }
.plan-features li.is-off::before { content: "—"; color: var(--ink-4); }

.plan .btn { margin-top: auto; text-decoration: none; }

/* buy steps */
.steps { counter-reset: step; display: flex; flex-direction: column; gap: 12px; }
.step {
  display: grid; grid-template-columns: 26px 1fr; gap: 12px;
  align-items: start;
}
.step-num {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--ink);
  background: var(--sheen-3);
  border: 1px solid var(--line);
  border-radius: 50%;
}
.step-text { font-size: 14px; line-height: 1.6; color: var(--ink-2); padding-top: 3px; }
.step-text b { color: var(--ink); font-weight: 590; }

.faq { display: flex; flex-direction: column; gap: 0; }
.faq-item { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.faq-item:last-child { border-bottom: 0; }
.faq-q { font-size: 14px; font-weight: 510; color: var(--ink); margin-bottom: 5px; }
.faq-a { font-size: 13.5px; line-height: 1.6; color: var(--ink-3); }

@media (max-width: 640px) {
  .pricing-head h1 { font-size: 25px; letter-spacing: -0.5px; }
  .pricing-wrap { padding: 22px 16px 56px; }
  .modal-card { padding: 18px; }
}
