/* Nxt_gram's public page on gram.nxtatlas.com. tokens.css and product.css
   (shared with every NxtAtlas product page) carry the look; this adds only
   what they lack: the live list of every function, and a header that offers
   two other languages instead of one. */

.hdr-langs{ display:flex; align-items:center; gap:clamp(10px, 1.6vw, 16px); }

.fns{ padding-block:clamp(48px, 8vh, 96px); }
.fns .lede{ max-width:56ch; margin-top:14px; }

.fns-cats{ display:flex; flex-wrap:wrap; gap:8px; margin-top:clamp(24px, 3vw, 34px); }
.fns-cat{
  font:500 11.5px/1 var(--body); letter-spacing:.12em; text-transform:uppercase;
  padding:10px 14px; border-radius:999px; border:1px solid var(--line-strong);
  background:none; color:var(--paper-soft); cursor:pointer;
  transition:border-color var(--fast) var(--ease), color var(--fast) var(--ease), background-color var(--fast) var(--ease);
  -webkit-tap-highlight-color:transparent;
}
@media (hover:hover){ .fns-cat:hover{ border-color:var(--brass-soft); color:var(--paper); } }
.fns-cat[aria-pressed="true"]{ background:var(--brass); border-color:var(--brass); color:var(--ink); }
.fns-cat:focus-visible{ outline:2px solid var(--brass); outline-offset:2px; }

.fns-list{
  list-style:none; margin:18px 0 0; padding:0;
  display:grid; grid-template-columns:repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap:clamp(10px, 1.4vw, 14px);
}
.fn{
  background:var(--ink-card); border:1px solid var(--line); border-radius:14px;
  padding:16px 18px 18px; display:flex; flex-direction:column; gap:8px; min-width:0;
}
.fn[hidden]{ display:none; }
.fns-more{
  display:block; margin:18px auto 0; padding:13px 22px; border-radius:999px;
  border:1px solid var(--brass-soft); background:none; color:var(--brass);
  font:500 12px/1 var(--body); letter-spacing:.12em; text-transform:uppercase; cursor:pointer;
  transition:background-color var(--fast) var(--ease), color var(--fast) var(--ease);
  -webkit-tap-highlight-color:transparent;
}
@media (hover:hover){ .fns-more:hover{ background:var(--brass); color:var(--ink); } }
.fns-more:focus-visible{ outline:2px solid var(--brass); outline-offset:2px; }
.fns-more[hidden]{ display:none; }
.fn-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; min-height:22px; }
.fn-cmd{ font-family:var(--mono); font-size:14px; color:var(--brass-lit); overflow-wrap:anywhere; }
.fn-cmd.is-auto{ font-size:12px; letter-spacing:.06em; color:var(--paper-dim); }
.fn-plan{
  flex:none; font:600 9.5px/1 var(--body); letter-spacing:.16em; text-transform:uppercase;
  padding:5px 7px; border-radius:4px; border:1px solid var(--line-strong); color:var(--paper-dim);
}
.fn-plan.is-top{ border-color:var(--brass-soft); color:var(--brass); }
.fn-name{ margin:0; font-family:var(--display); font-weight:500; font-size:16px; line-height:1.3; color:var(--paper); }
.fn-sum{ margin:0; font-size:13.5px; line-height:1.55; color:var(--paper-soft); }

@media (prefers-reduced-motion:reduce){ .fns-cat, .fns-more{ transition:none; } }

/* privacy: the bot's /privacy text, after the last call to action. Quiet on
   purpose: small type, no motion, nothing that reads like a banner. */
.prv{ padding-block:clamp(36px, 6vh, 64px); border-top:1px solid var(--line); }
.prv-h{ margin:14px 0 0; font-size:clamp(18px, 2.2vw, 22px); line-height:1.3; letter-spacing:0; max-width:none; }
.prv-list{ margin:16px 0 0; padding:0 0 0 1.1em; max-width:68ch; display:flex; flex-direction:column; gap:8px; color:var(--paper-dim); font-size:14px; line-height:1.6; }
.prv-list li::marker{ color:var(--brass); }
.prv-list code{ font-family:var(--mono); font-size:.92em; color:var(--paper-soft); }

/* the visitor's account, the last thing in the header: a person and a word
   while signed out (just the person on narrow screens), the account's initial
   once signed in (landing.js) */
.hdr-account{ display:inline-flex; align-items:center; gap:8px; flex:none; color:var(--paper-soft); font-size:12px; text-decoration:none; }
.hdr-account:hover{ color:var(--paper); }
.hdr-account:focus-visible{ outline:2px solid var(--brass); outline-offset:3px; border-radius:999px; }
.hdr-account-ico{
  width:32px; height:32px; padding:6px; flex:none; border-radius:50%;
  border:1px solid var(--line); fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round;
  transition:border-color .2s ease;
}
.hdr-account:hover .hdr-account-ico{ border-color:var(--brass-soft); }
.hdr-account-ini{
  width:32px; height:32px; border-radius:50%; display:grid; place-items:center;
  background:var(--brass-faint); border:1px solid var(--brass-soft);
  color:var(--brass-lit); font-size:14px; font-weight:600; line-height:1; letter-spacing:0;
  transition:border-color .2s ease;
}
.hdr-account.is-in:hover .hdr-account-ini{ border-color:var(--brass); }
@media (max-width:860px){ .hdr-account-t{ display:none; } }
/* On a phone the header holds the mark, the languages, the bot and the
   account, and something has to give, narrowest last: the status link (it is
   in the footer too), then room between items, the GRAM tag, and on the
   smallest screens the wordmark beside the ghost. The owner's extra console
   button takes the wordmark sooner. */
@media (max-width:560px){ .hdr-act .hdr-status{ display:none; } }
@media (max-width:400px){
  .hdr-act{ gap:10px; }
  .hdr-account-ico, .hdr-account-ini{ width:30px; height:30px; }
  .hdr-account-ico{ padding:5px; }
  .hdr:has(.hdr-admin) .hdr-mark .wm, .hdr:has(.hdr-admin) .hdr-tag{ display:none; }
}
@media (max-width:370px){ .hdr-tag{ display:none; } }
@media (max-width:340px){ .hdr-mark .wm{ display:none; } }
@media (prefers-reduced-motion:reduce){ .hdr-account-ico, .hdr-account-ini{ transition:none; } }

/* the owner's way into the console; only added for the owner (landing.js) */
.hdr-act .hdr-admin{ padding:10px 16px; border-color:var(--brass-soft); color:var(--brass); }
.hdr-act .hdr-admin:hover{ border-color:var(--brass); background:var(--brass-faint); color:var(--brass-lit); }
.hdr-act .hdr-admin:focus-visible{ outline:2px solid var(--brass); outline-offset:2px; }
.hdr-admin svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; }
@media (max-width:480px){
  .hdr-act .hdr-admin{ padding:8px; }
  .hdr-act .hdr-admin svg.t-narrow{ display:block; }
  /* the owner knows where the status page is; the room goes to the two buttons */
  .hdr-act:has(.hdr-admin) .hdr-status{ display:none; }
}
@media (max-width:400px){
  .hdr-act:has(.hdr-admin){ gap:10px; }
  .hdr-act .hdr-admin{ padding:7px; }
}
@media (max-width:380px){
  .hdr:has(.hdr-admin) .hdr-tag{ display:none; }
}

/* ---- the ghost stickers (landing.js → stickers()) ---- */
.stk{ display:block; width:100%; height:100%; }
.stk video, .stk img{ display:block; width:100%; height:100%; object-fit:contain; background:transparent; }

/* the hero's waving ghost sits at the centre of the instrument's rings */
.hero-ghost{
  position:absolute; z-index:2; right:-7%; top:50%; translate:0 -50%;
  width:clamp(240px, 40vw, 500px); aspect-ratio:1; pointer-events:none;
  display:grid; place-items:center;
  opacity:0; animation:ghostIn 1.2s var(--ease) .7s forwards;
}
.hero-ghost .stk{ width:62%; height:62%; }
@keyframes ghostIn{ from{ opacity:0; transform:translateY(16px) scale(.96); } to{ opacity:1; transform:none; } }

/* a section's ghost, top right of its heading */
.plans .shell, .prv .shell{ position:relative; }
.sec-ghost{ position:absolute; right:clamp(0px, 4vw, 48px); top:-8px; width:clamp(150px, 15vw, 200px); aspect-ratio:1; pointer-events:none; }
.prv .sec-ghost{ top:50%; translate:0 -50%; }

@media (max-width:1000px){
  /* on a phone the rings fade back; the ghost stays, smaller, beside the title */
  .hero-ghost{ right:-4px; top:-8px; translate:0 0; width:clamp(92px, 25vw, 160px); }
  .hero-ghost .stk{ width:100%; height:100%; }
  .sec-ghost{ right:0; top:-6px; width:clamp(92px, 22vw, 140px); }
  .prv .sec-ghost{ top:-6px; translate:0 0; }
  .prv-h, .plans h2{ padding-right:clamp(84px, 20vw, 130px); }
  /* a one-line heading is shorter than the ghost beside it: hold the text
     below it clear of the ghost (its width less the eyebrow above) */
  .prv-h, .plans h2{ min-height:calc(clamp(92px, 22vw, 140px) - 32px); }
}
@media (prefers-reduced-motion:reduce){
  .hero-ghost{ opacity:1; animation:none; }
}

/* the channel, in the header on wide screens (the footer always has it) */
.hdr-channel{ color:var(--paper-soft); font-size:12px; text-decoration:none; }
@media (max-width:860px){ .hdr-channel{ display:none; } }

/* Userbot+: the add-on, a wide card under the two plans */
.plan-addon{ margin-top:clamp(16px, 2vw, 24px); padding:0; overflow:hidden; display:grid; grid-template-columns:minmax(0, 1.05fr) minmax(0, 1fr); border-color:var(--brass-soft); }
/* the banner whole, its own dark (#0a0a0c) filling the column around it */
.addon-art{ display:block; width:100%; height:100%; object-fit:contain; background:#0a0a0c; }
.addon-body{ padding:clamp(22px, 3vw, 34px); display:flex; flex-direction:column; }
.addon-note{ font-size:13px; letter-spacing:0; text-transform:none; }
.addon-cta{ align-self:flex-start; margin-top:18px; }
/* Free: the invite offer, its note and button at the foot of the card */
.plan-free{ display:flex; flex-direction:column; }
.plan-free .addon-note{ margin-top:auto; padding-top:14px; }
.plan-cta{ align-self:flex-start; margin-top:16px; }
/* Nxt+: bought in the bot for Stars, its button at the foot like Free's */
.plan-top{ display:flex; flex-direction:column; }
.plan-top .plan-cta{ margin-top:auto; }
.plan-top .plan-price-note{ margin-bottom:16px; }
@media (max-width:860px){
  .plan-addon{ grid-template-columns:1fr; }
  .addon-art{ height:auto; aspect-ratio:16 / 9; }
}

.nowrap{ white-space:nowrap; }
