/* ============================================================
   DotSense Plus — gate overlay, auth form, and account page
   styles. Follows the assets/dotsense-fractions.css precedent:
   a separate stylesheet layered on top of assets/dotsense.css,
   reusing its CSS variables (--bg, --surface, --border, --text,
   --muted, --teal, --coral) rather than any hardcoded color, so
   it inherits dark/light theme automatically.

   Loaded only by paid tool pages, account.html, and
   auth-callback.html — never by the free tools.
   ============================================================ */

/* ---- full-screen overlay shown while checking access, or
   showing the unlock screen, in front of a gated tool ---- */
.gate-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; font-family: 'Nunito', sans-serif;
}

.gate-overlay.gate-loading .gate-card { text-align: center; }

/* ---- the unlock-screen / loading card ---- */
.gate-card {
  width: 100%; max-width: 440px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 34px 30px;
}
.gate-card .gate-eyebrow {
  display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 99px;
  border: 1px solid var(--border); color: var(--muted); margin-bottom: 14px;
}
.gate-card h2 { font-size: 1.4rem; font-weight: 900; margin-bottom: 8px; line-height: 1.2; }
.gate-card p.gate-desc { font-size: .9rem; color: var(--muted); font-weight: 600; line-height: 1.55; margin-bottom: 22px; }

.gate-spinner {
  width: 34px; height: 34px; margin: 0 auto 16px;
  border: 3px solid var(--border); border-top-color: var(--teal);
  border-radius: 50%; animation: gateSpin .8s linear infinite;
}
@keyframes gateSpin { to { transform: rotate(360deg); } }
.gate-loading-text { font-size: .85rem; color: var(--muted); font-weight: 700; }

/* ---- buttons inside the gate (reuse .btn-primary / .btn-ghost look) ---- */
.gate-actions { display: flex; flex-direction: column; gap: 10px; }
.gate-btn {
  display: block; width: 100%; text-align: center;
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: .95rem;
  padding: 13px 20px; border-radius: 12px; cursor: pointer;
  text-decoration: none; border: none; transition: opacity .15s, border-color .15s, color .15s;
}
.gate-btn:active { transform: scale(.98); }
.gate-btn-primary { background: var(--teal); color: var(--active-fg); }
.gate-btn-primary:hover { opacity: .9; }
.gate-btn-secondary { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.gate-btn-secondary:hover { border-color: var(--teal); color: var(--teal); }
.gate-btn-coral { background: var(--coral); color: #fff; }
.gate-btn-coral:hover { opacity: .88; }

.gate-divider { display: flex; align-items: center; gap: 10px; margin: 4px 0; color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.gate-divider::before, .gate-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.gate-back-link { display: block; text-align: center; margin-top: 18px; font-size: .8rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.gate-back-link:hover { color: var(--teal); }

.gate-error {
  font-size: .82rem; font-weight: 700; color: var(--coral);
  background: transparent; border: 1.5px solid var(--coral);
  border-radius: 10px; padding: 8px 12px; margin-bottom: 4px;
  display: none;
}
.gate-error.show { display: block; }

.gate-note { font-size: .74rem; color: var(--muted); font-weight: 600; text-align: center; margin-top: 14px; line-height: 1.5; }

/* ---- hand-rolled auth form (email + password), derived from
   the site's chip/input vocabulary since there's very little
   existing form UI to match against ---- */
.gate-form { display: flex; flex-direction: column; gap: 12px; }
.gate-field { display: flex; flex-direction: column; gap: 5px; }
.gate-field label {
  font-size: .64rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted);
}
.gate-field input {
  padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text); font-family: 'Nunito', sans-serif;
  font-size: .92rem; font-weight: 600; transition: border-color .15s;
}
.gate-field input:focus { outline: none; border-color: var(--teal); }

.gate-toggle-row { display: flex; justify-content: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--muted); margin-top: 4px; flex-wrap: wrap; }
.gate-toggle-row button {
  background: none; border: none; color: var(--teal); font-family: 'Nunito', sans-serif;
  font-weight: 800; font-size: .8rem; cursor: pointer; padding: 0; text-decoration: underline;
}

.gate-magic-link {
  background: none; border: none; color: var(--teal); font-family: 'Nunito', sans-serif;
  font-weight: 800; font-size: .82rem; cursor: pointer; padding: 4px 0;
  text-align: center; text-decoration: underline;
}

/* ---- trial banner, shown on gated tool pages while a free trial
   is active — fixed corner pill so it can't collide with a tool's
   own top-of-stage controls the way a full-width bar could. ---- */
.gate-trial-banner {
  position: fixed; top: 14px; right: 14px; z-index: 9998;
  display: flex; align-items: center; gap: 10px;
  background: var(--yellow); color: var(--active-fg);
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: .78rem;
  padding: 8px 12px; border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.gate-trial-banner a { color: inherit; text-decoration: underline; white-space: nowrap; }
.gate-trial-banner button {
  background: none; border: none; color: inherit; font-size: 1rem; font-weight: 900;
  cursor: pointer; line-height: 1; padding: 0;
}

.gate-founding-badge {
  display: inline-block; font-size: .62rem; font-weight: 900; text-transform: uppercase;
  letter-spacing: .06em; padding: 3px 10px; border-radius: 99px;
  background: var(--yellow); color: var(--active-fg); margin-bottom: 10px;
}

/* ============================================================
   Account page (account.html) — a normal site page inside the
   standard .site container, not part of the overlay.
   ============================================================ */
.account-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 30px; max-width: 560px; margin: 0 auto;
}
.account-row {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap;
  gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--border);
}
.account-row:last-of-type { border-bottom: none; }
.account-row .label { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.account-row .value { font-size: .95rem; font-weight: 700; color: var(--text); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.account-plan-badge {
  display: inline-block; font-size: .62rem; font-weight: 900; text-transform: uppercase;
  letter-spacing: .06em; padding: 3px 10px; border-radius: 99px;
  background: var(--teal); color: var(--active-fg);
}
.account-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
