/* The signup/paywall modal, ported verbatim from the design. */
[hidden] { display: none !important; }

.paywall {
  --paper: #f4ede8;
  --ink: #170f0e;
  --line: rgba(244, 237, 232, 0.09);
  --line-strong: rgba(244, 237, 232, 0.17);
  --text: #f4ede8;
  --text-2: #b9adae;
  --text-3: #8b7f81;
  --accent: #d46a58;
  --accent-2: #f09a83;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

.paywall .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.paywall .btn:active { transform: translateY(1px); }
.paywall .btn-light { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.paywall .btn-light:hover { background: #fff; border-color: #fff; box-shadow: 0 8px 34px -12px rgba(244, 237, 232, 0.55); }
.paywall .btn:disabled { opacity: 0.6; cursor: wait; }

/* --------------------------------------------------------------------------
   Paywall
   -------------------------------------------------------------------------- */

body.paywall-open {
  overflow: hidden;
}

.paywall {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.paywall-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 4, 6, 0.74);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.paywall-card {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 38px 34px 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 30%),
    linear-gradient(180deg, #1a1418 0%, #100d10 100%);
  border: 1px solid rgba(212, 106, 88, 0.3);
  border-radius: 22px;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 40px 100px -30px rgba(0, 0, 0, 0.95),
    0 0 130px -60px rgba(212, 106, 88, 0.65);
  animation: paywall-in 0.32s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.paywall-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 14%;
  right: 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 154, 131, 0.8), transparent);
}

.paywall-close {
  position: absolute;
  top: 13px;
  right: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-3);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.paywall-close:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.paywall-close svg {
  width: 13px;
  height: 13px;
}

.paywall-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  background: rgba(212, 106, 88, 0.14);
  border: 1px solid rgba(212, 106, 88, 0.42);
  border-radius: 50%;
  color: var(--accent-2);
}

.paywall-icon svg {
  width: 25px;
  height: 25px;
}

.paywall-kicker {
  margin-bottom: 8px;
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.paywall-card h2 {
  font-family: var(--serif);
  font-size: 2.15rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}

.paywall-copy {
  margin-top: 12px;
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.62;
  text-wrap: pretty;
}

/* Plan switch ----------------------------------------------------------- */

.plan-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 20px 0 18px;
}

.plan-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 15px 13px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.plan-option:hover {
  border-color: var(--line-strong);
}

.plan-option.is-active {
  border-color: rgba(212, 106, 88, 0.62);
  background: rgba(212, 106, 88, 0.08);
}

.plan-badge {
  position: absolute;
  top: -9px;
  right: 10px;
  padding: 2px 7px;
  background: var(--accent);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.plan-name {
  color: var(--text-3);
  font-size: 0.72rem;
  font-weight: 500;
}

.plan-price {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.plan-price span {
  color: var(--text-3);
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0;
}

.plan-equiv {
  color: var(--text-3);
  font-size: 0.66rem;
}

/* Forms ---------------------------------------------------------------- */

.paywall-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.paywall-step[data-step="1"] .paywall-form {
  margin-top: 18px;
}

.paywall-label {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 0.7rem;
  font-weight: 500;
}

.paywall-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.86rem;
  outline: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.paywall-input::placeholder {
  color: #6f6265;
  opacity: 1;
}

.paywall-input:focus {
  border-color: rgba(212, 106, 88, 0.6);
  background: rgba(255, 255, 255, 0.04);
}

.paywall-input.is-invalid {
  border-color: #e88b8b;
}

.paywall-form .btn {
  width: 100%;
  margin-top: 8px;
}

.paywall-error {
  color: #f0a0a0;
  font-size: 0.72rem;
  line-height: 1.4;
}

.checkout-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.checkout-row > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkout-summary {
  margin: 18px 0 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 0.8rem;
  text-align: left;
}

.checkout-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 5px 0;
}

.checkout-summary span {
  flex-shrink: 0;
  color: var(--text-3);
}

.checkout-summary strong {
  overflow: hidden;
  color: var(--text-2);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkout-total {
  margin-top: 6px;
  padding-top: 10px !important;
  border-top: 1px solid var(--line);
}

.checkout-total strong {
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.paywall-back {
  position: absolute;
  top: 18px;
  left: 18px;
  display: inline-flex;
  padding: 0;
  background: none;
  border: 0;
  color: var(--text-3);
  font-size: 0.74rem;
  transition: color 0.15s ease;
}

.paywall-back:hover {
  color: var(--text);
}

.paywall-icon-success {
  color: #c6d6a4;
  border-color: rgba(198, 214, 164, 0.4);
  background: rgba(198, 214, 164, 0.1);
}

.paywall-step[data-step="3"] .btn {
  width: 100%;
  margin-top: 20px;
}

.paywall-note {
  margin-top: 14px;
  color: var(--text-3);
  font-size: 0.7rem;
}


@keyframes paywall-in {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 560px) {
  .paywall { padding: 16px; }
  .paywall-card { padding: 32px 22px 24px; }
  .paywall-card h2 { font-size: 1.8rem; }
}
