/* Account: who is signed in; signing out. The header's Sign in / account
   link, and the page without its rail while signed out. */
.card.account p { max-width: 72ch; }
.card.account p { margin: 0; }
.account-actions { display: flex; gap: var(--s2); }
/* The header's Blog and Documentation links (always, at the right, before Sign in / ☰) and Sign in button (signed out only). */
#h-docs, #h-blog { flex: none; color: #b4bcc1; text-decoration: none; font-size: var(--fs-m); padding: 6px 10px; border-radius: var(--radius); white-space: nowrap; }
#h-docs:hover, #h-docs.on, #h-blog:hover, #h-blog.on { background: var(--raised); color: var(--text); }
/* Sign in is an icon in a box like the ☰ button's (base.css button, #menu-btn), no wider: ☰ is what most see. */
#h-account { flex: none; display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
    padding: var(--s1) var(--s3); min-height: var(--control-h); font-size: var(--fs-l); line-height: 1; border-radius: var(--radius);
    background: var(--raised); border: 1px solid var(--line); color: var(--text); }
#h-account svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#h-account:hover { background: var(--hover); }
#h-account[hidden] { display: none; }
/* Sign in and the ☰ button in one cell of the same size: whichever is out of use keeps its room, unseen,
   so the header doesn't shift when /api/me answers and one replaces the other. */
#h-slot { flex: none; display: inline-grid; align-items: center; }
#h-slot > * { grid-area: 1 / 1; text-align: center; }
#h-slot > #h-account[hidden] { display: block !important; visibility: hidden; }   /* over base.css [hidden] */
/* The email signed in as: first in the ☰ menu, plain text, set apart. */
#nav-email { flex: none; padding: var(--s1) var(--s3) var(--s3); margin-bottom: var(--s1); border-bottom: 1px solid var(--line); color: var(--dim); font-size: var(--fs-s);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }   /* one line: a long email ends in …, its title has it whole */
#nav-email[hidden] { display: none; }
/* Sign out: last in the ☰ menu, set apart. */
#nav-signout { margin-top: var(--s2); border-top: 1px solid var(--line); padding-top: var(--s3); }
#nav-signout[hidden] { display: none; }
/* The org picker: in the ☰ menu, under the email; only there in more than one shared org. */
#nav-org-box { flex: none; padding: 0 var(--s1) var(--s3); margin-bottom: var(--s1); border-bottom: 1px solid var(--line); }
/* Under the email, no rule between them: the rule comes after the picker. */
#rail:has(#nav-org:not([hidden])) #nav-email { border-bottom: 0; margin-bottom: 0; padding-bottom: var(--s2); }
#nav-org-box:has(> #nav-org[hidden]) { display: none; }
#nav-org { width: 100%; font-size: var(--fs-m); }
/* The credits left: under the email and the org picker, the rule after it instead. */
#nav-credits { flex: none; padding: 0 var(--s3) var(--s3); margin-bottom: var(--s1); border-bottom: 1px solid var(--line); color: var(--dim);
    font-size: var(--fs-s); text-decoration: none; }   /* proportional figures: tabular ones set the comma apart ("1 , 000") */
#nav-credits:hover { color: var(--text); }
#nav-credits.low { color: var(--warn-text); }
#nav-credits[hidden] { display: none; }
#rail:has(#nav-credits:not([hidden])) #nav-email, #rail:has(#nav-credits:not([hidden])) #nav-org-box { border-bottom: 0; margin-bottom: 0; padding-bottom: var(--s2); }
#orgs-card, #keys-card { margin-top: var(--s4); }
#orgs-card h3 { margin: var(--s2) 0 0; font-size: var(--fs-m); font-weight: 600; }
.org-invite input { flex: 2 1 200px; width: auto; }
.org-invite select { flex: 0 0 auto; width: auto; }

/* Acting for a disabled org (orgs/manage.py disable): the ☰ menu holds only Credits and Account (and the org picker, to leave it). */
body.org-disabled #rail > a[data-page]:not([data-page="credits"]):not([data-page="account"]),
body.org-disabled #rail > .nav-group, body.org-disabled #rail > .rail-phone { display: none; }
/* Signed out (hosted): no ☰ menu. */
body.signed-out #rail { display: none; }
body.signed-out #menu-btn { visibility: hidden; }
/* Credits (pages/credits.js): the admins' grant form */
.grant-form { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s3); }
.grant-form input { flex: 1 1 140px; min-width: 0; }
.buy-packs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: var(--s3) 0; }
.grant-search { margin-bottom: var(--s2); }
/* The admins' Storage page (pages/admin.js): an org and a span on one line */
.storage-pick { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: var(--s3) 0; }
.storage-pick > input { flex: 0 1 360px; min-width: 0; }
.storage-pick > select { width: auto; }
.storage-pick > .vpick { flex: 0 1 360px; min-width: 0; }
.deleted-org { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s3); }
.grant-search input[type=search].search { width: 360px; color: inherit; }
.credits-left { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.01em; }
.credit-in { color: #7fd39a; }
.credit-owed { color: var(--bad-text); }
#credits-page .nowrap { white-space: nowrap; }
.amount { font-variant-numeric: tabular-nums; font-weight: 500; }
/* API keys (pages/apikeys.js): a token just made, shown once; the create form. */
.key-made { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s3); border: 1px solid var(--warn-line);
    background: var(--warn-bg); border-radius: var(--radius); }
.key-made b { flex: 1 1 100%; font-weight: 600; }
.key-made code { flex: 1 1 320px; min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-s); cursor: copy; }
.key-form input { flex: 2 1 200px; width: auto; }
.key-form select { flex: 0 0 auto; width: auto; }
.buy-custom { display: flex; flex-direction: row; align-items: center; gap: var(--s2); margin: 0; }
.buy-custom .buy-amount { width: calc(22ch + 2.5em); }   /* the whole placeholder, and the spinner */
#credits-page .loading-dim { opacity: .55; transition: opacity .15s; }
