/* Nxt_gram account page, gram.nxtatlas.com/account. The console's palette
   (ink and brass), light and dark from the system; one narrow column. */

:root {
  --bg: #f7f5f1; --bg-elev: #ffffff; --bg-hover: #efebe4; --bg-active: #e6e0d6;
  --text: #17140f; --text-muted: #5f584c; --text-soft: #857d70;
  --border: rgba(23, 20, 15, 0.11); --border-strong: rgba(23, 20, 15, 0.2);
  --accent: #a87528; --accent-hover: #93661f; --accent-soft: rgba(168, 117, 40, 0.12); --accent-text: #ffffff;
  --danger: #a8322a; --danger-soft: rgba(168, 50, 42, 0.08); --success: #1a6b48; --success-soft: rgba(26, 107, 72, 0.1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Noto Sans Armenian", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0b0d; --bg-elev: #12141a; --bg-hover: #191c22; --bg-active: #21252d;
    --text: #ece8e1; --text-muted: #aaa497; --text-soft: #7f7a71;
    --border: rgba(236, 232, 225, 0.1); --border-strong: rgba(236, 232, 225, 0.18);
    --accent: #d1a05a; --accent-hover: #e0b473; --accent-soft: rgba(209, 160, 90, 0.14); --accent-text: #0a0b0d;
    --danger: #f08b80; --danger-soft: rgba(240, 139, 128, 0.1); --success: #3fb950; --success-soft: rgba(63, 185, 80, 0.12);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; min-height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }
[hidden] { display: none !important; }
a { color: var(--accent); }
h1, h2, p { margin: 0; }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px clamp(16px, 3vw, 32px);
  padding-top: max(12px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.brand-ava { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-weight: 700; font-size: 15px; }
.brand-name em { font-style: normal; color: var(--accent); }
.brand-sub { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); white-space: nowrap; }
.top-act { display: flex; align-items: center; gap: 14px; }
.langs { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; }
.lang-btn { font: inherit; font-size: 11.5px; font-weight: 600; padding: 4px 7px; border: 0; border-radius: 6px; background: none; color: var(--text-muted); cursor: pointer; }
.lang-btn[aria-pressed="true"] { background: var(--bg-active); color: var(--text); }
.top-link { font-size: 13px; font-weight: 500; color: var(--text-muted); text-decoration: none; white-space: nowrap; }
.top-link:hover { color: var(--text); }
.lang-btn:focus-visible, .top-link:focus-visible, .brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 420px) { .brand-sub { display: none; } .top-act { gap: 10px; } }

/* the column */
main { padding: clamp(20px, 5vw, 48px) 16px 56px; }
.page { max-width: 520px; margin: 0 auto; display: grid; gap: 14px; }
.card { padding: 22px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-elev); display: grid; gap: 12px; }
.card.is-loading { min-height: 160px; place-items: center; }
.card-label { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }

.gate { text-align: center; justify-items: center; padding: 34px 26px; }
.gate-ava { width: 64px; height: 64px; border-radius: 50%; }
.gate h1 { font-size: 22px; letter-spacing: -.01em; }
.gate p { max-width: 380px; }

.acct-who { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }

.tg-state { font-size: 18px; font-weight: 650; display: flex; align-items: center; gap: 10px; }
.tg-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ava {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 18px;
  background: var(--accent-soft); color: var(--accent);
}
.tg-names { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tg-name { font-weight: 650; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-names .muted { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { flex: none; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; color: var(--success); background: var(--success-soft); }

.steps { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; color: var(--text-muted); }
.steps li::marker { color: var(--accent); font-weight: 700; }

.note { font-size: 14px; padding: 10px 12px; border-radius: 10px; background: var(--bg-hover); color: var(--text-muted); }
.note.is-error { background: var(--danger-soft); color: var(--danger); }
.note.is-ok { background: var(--success-soft); color: var(--success); }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px;
  font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-outline { background: none; border-color: var(--border-strong); color: var(--text); }
.btn-quiet { background: none; color: var(--text-muted); }
.btn-danger { color: var(--danger); }
.btn-wide { width: 100%; }
@media (hover: hover) {
  .btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
  .btn-outline:hover:not(:disabled), .btn-quiet:hover:not(:disabled) { background: var(--bg-hover); }
}

/* a quiet spinner */
.spin { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--border-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.spin.is-small { width: 16px; height: 16px; border-width: 2px; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* linked just now, while the page watched */
.card.is-fresh { animation: fresh 1.2s ease-out 1; }
@keyframes fresh { from { border-color: var(--success); box-shadow: 0 0 0 4px var(--success-soft); } }

@media (prefers-reduced-motion: reduce) {
  .spin { animation-duration: 2.4s; }
  .card.is-fresh { animation: none; border-color: var(--success); }
  .btn { transition: none; }
}

/* ---- the plan and payments (account page), and the payment pages ---- */
.card-wait { display: grid; place-items: center; min-height: 60px; }
.plan-now { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.subs-h { margin: 6px 0 0; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-soft); }
.orders { list-style: none; margin: 0; padding: 0; display: grid; }
.order { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.order:first-child { border-top: 0; }
.order-main { display: flex; flex-direction: column; min-width: 0; color: inherit; text-decoration: none; }
.order-main:hover .order-what { text-decoration: underline; text-underline-offset: 3px; }
.order-what { font-weight: 600; font-size: 14.5px; }
.order-when { font-size: 12.5px; }
.order-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.order-sum { font-variant-numeric: tabular-nums; font-weight: 600; }
.pill.is-ok { color: var(--success); background: var(--success-soft); }
.pill.is-wait { color: var(--accent); background: var(--accent-soft); }
.pill.is-bad { color: var(--danger); background: var(--danger-soft); }
.pill.is-info { color: var(--text-muted); background: var(--bg-hover); }

.field { display: grid; gap: 8px; }
.field-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-soft); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 12px; justify-self: start; }
.seg-btn { font: inherit; font-weight: 600; font-size: 14px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: none; color: var(--text-muted); cursor: pointer; }
.seg-btn[aria-checked="true"] { background: var(--bg-active); color: var(--text); }
.plans, .periods { display: grid; gap: 8px; }
.plan-opt, .period {
  font: inherit; text-align: left; color: var(--text); cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 12px; background: none;
  -webkit-tap-highlight-color: transparent; transition: border-color .15s ease, background-color .15s ease;
}
.plan-opt { display: grid; gap: 4px; padding: 12px 14px; }
.plan-opt-name { font-weight: 700; font-size: 15.5px; }
.plan-opt-desc { font-size: 13.5px; color: var(--text-muted); }
.plan-opt-why { font-size: 12.5px; color: var(--danger); }
.period { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 14px; font-size: 15px; }
.period-sum { font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-opt[aria-checked="true"], .period[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.plan-opt:disabled, .period:disabled { opacity: .55; cursor: default; }
.plan-opt:focus-visible, .period:focus-visible, .seg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) {
  .plan-opt:hover:not(:disabled):not([aria-checked="true"]), .period:hover:not(:disabled):not([aria-checked="true"]) { background: var(--bg-hover); }
}
.pay-actions { flex-direction: column; }
.nowrap { white-space: nowrap; }
/* /pay since 2026-11-17: Stars only, the prices to read, the button to the bot */
.stars-lead { font-size: 17px; font-weight: 600; line-height: 1.4; }
.star-plan { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 12px; }
.star-rows { display: grid; margin: 6px 0 0; }
.star-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 14.5px; }
.star-row:first-child { border-top: 0; }
.star-row dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.ret-h { font-size: 22px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.ret-h.is-ok { color: var(--success); }
.ret-h.is-bad { color: var(--danger); }
.order-line { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg-hover); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .plan-opt, .period { transition: none; } }

/* Nxt+ already on through Userbot+ (on /pay), and the free trial card (/account) */
.plan-opt-incl { font-size: 12.5px; color: var(--success); }
.trial-n { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.trial-dots { display: inline-flex; gap: 6px; }
.trial-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); }
.trial-dot.is-on { background: var(--accent); }
.trial-link {
  font: 13px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow-wrap: anywhere;
  padding: 10px 12px; border-radius: 10px; background: var(--bg-hover); color: var(--text-muted);
  -webkit-user-select: all; user-select: all;
}
