/* Console pieces outside the component set: the signed-out page, the top bar's popovers, loading, confirmations, the
   first run. Loaded after app.css; tokens only. */
body.booting { background: var(--canvas); }
.noscript { padding: var(--s-10); text-align: center; color: var(--ink-2); }
.skip { position: absolute; left: var(--s-2); top: -40px; z-index: 60; background: var(--btn); color: var(--on-btn); padding: var(--s-2) var(--s-3); border-radius: var(--r-s); }
.skip:focus { top: var(--s-2); }
.main:focus { outline: none; }
.org-name, .proj-name { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.switch .avatar { width: 20px; height: 20px; border-radius: var(--r-s); font-size: 9px; }
.sw-it .avatar { width: 22px; height: 22px; border-radius: var(--r-s); font-size: 10px; }
.sw-it.muted { color: var(--ink-2); }
.avatar.sq { border-radius: var(--r-s); }
img.avatar { object-fit: cover; background: var(--sunk); }
.nav-scrim { display: none; }
.nav a.credit-chip { display: block; height: auto; padding: var(--s-3); margin: 0 2px var(--s-1); font-weight: var(--w-regular); }
.nav a.credit-chip:hover { background: var(--canvas); }

/* the site wordmark */
.brand { padding: var(--s-1) var(--s-2); }
.mark { display: inline-flex; align-items: baseline; column-gap: .28em; font: var(--w-semibold) var(--fs-lead)/1 var(--sans); letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.mark i { display: inline-block; width: .28em; height: .28em; border-radius: 50%; background: var(--verm); margin-left: .08em; }
.mark.lg { font-size: var(--fs-figure); margin-bottom: var(--s-2); }

/* signed-out page (also the invitation error and a failed session check): the card, its title and one lead line, a
   note (.note; .bad for a sign-in error), the large buttons, the footer links */
body.signed-out { background: var(--canvas); }
.gate { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--s-8) var(--s-4); gap: var(--s-6); }
.gate-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl); padding: var(--s-8); display: flex; flex-direction: column; gap: var(--s-3); }
.gate-card h1 { font: var(--f-title); letter-spacing: var(--track-title); margin: var(--s-3) 0 0; }
.gate-card > p { margin: 0 0 var(--s-2); color: var(--ink-2); }
.gate-card .btn { width: 100%; }
.gate-card .note { margin: 0 0 var(--s-1); }
.gate-foot { display: flex; gap: var(--s-5); font: var(--f-small); }
.gate-foot a { color: var(--ink-3); }
@media (max-width: 760px) { .gate-card { padding: var(--s-6) var(--s-5); } }

/* loading */
.loading { display: flex; gap: 6px; justify-content: center; padding: 60px 0; }
.loading i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); animation: dot 1s var(--ease) infinite; }
.loading i:nth-child(2) { animation-delay: .15s; } .loading i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

/* errors on a form */
.form-err { background: var(--bad-wash); color: var(--bad-ink); padding: var(--s-2) var(--s-3); border-radius: var(--r-m); }

/* "the request this makes" */
details.eq { border-top: 1px solid var(--line); padding-top: var(--s-3); }
details.eq summary { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); color: var(--ink-3); cursor: pointer; list-style: none; border-radius: var(--r-s); padding: 2px var(--s-1); margin-left: calc(-1 * var(--s-1)); }
details.eq summary::-webkit-details-marker { display: none; }
details.eq summary:hover { color: var(--ink); }
details.eq .code { margin-top: var(--s-2); }

/* confirm popover */
.confirm { width: 300px; }
.confirm-b { padding: var(--s-4); }
.confirm-b b { display: block; font: var(--f-heading); margin-bottom: var(--s-1); }
.confirm-b p { margin: 0; color: var(--ink-2); }
.confirm-a { justify-content: flex-end; margin-top: var(--s-3); }

/* account popover */
.acct { width: 260px; padding: 6px; }
.acct-h { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); margin-bottom: var(--s-1); }
.acct-h .avatar { width: 32px; height: 32px; font-size: var(--fs-small); }
.acct-h b { display: block; font-weight: var(--w-semibold); }
.acct-h small { color: var(--ink-3); font-size: var(--fs-small); }
.acct-l a, .acct-l button { display: flex; align-items: center; gap: var(--s-2); width: 100%; height: var(--h-md); padding: 0 var(--s-2); border: 0; background: none; border-radius: var(--r-s); color: var(--ink); }
.acct-l a:hover, .acct-l button:hover { background: var(--hover); text-decoration: none; }
.acct-l .i { color: var(--ink-3); }

/* row menu */
.menu-pop { min-width: 180px; padding: 5px; }
.menu-pop button { display: flex; align-items: center; gap: var(--s-2); width: 100%; height: var(--h-md); padding: 0 var(--s-2); border: 0; background: none; border-radius: var(--r-s); color: var(--ink); text-align: left; }
.menu-pop button:hover, .menu-pop button:focus-visible { background: var(--hover); box-shadow: none; }
.menu-pop button .i { color: var(--ink-3); }
.menu-pop button.danger, .menu-pop button.danger .i { color: var(--bad-ink); }
.menu-why { margin: var(--s-1) var(--s-2) 6px; font-size: var(--fs-small); color: var(--ink-3); max-width: 240px; }

/* key-value lists inside pages, people and times */
.kv-panel dl.kv { grid-template-columns: 180px 1fr; padding: var(--s-1) 0; }
.who { font-size: var(--fs-small); color: var(--ink-3); }
.row-actions { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; }

/* overview: the stat strip (app.css), the latest changes as a feed, the plan and the runs panels, the keys table */
.ov { margin-top: var(--s-4); align-items: stretch; }
.ov-side > .panel:last-child { flex: 1; }
.ov-row { margin-top: var(--s-4); }
.ov > .panel.ov-main:not(:has(ol.feed)) { align-self: start; }
.plan-n { font: var(--f-title-s); margin: 0 0 var(--s-1); }
.ov .panel > .empty { padding: var(--s-6) var(--s-4); }
ol.feed { list-style: none; margin: 0; padding: var(--s-2); }
ol.feed li { display: grid; grid-template-columns: 24px 1fr auto; gap: var(--s-3); align-items: center; padding: var(--s-2); border-radius: var(--r-m); }
ol.feed li p { margin: 0; }
ol.feed time { font: var(--f-small); color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.feed-ic { display: flex; }
.feed-ic .avatar { width: 24px; height: 24px; font-size: var(--fs-micro); }
.feed li.fresh { animation: rowin .32s var(--rise); }
@media (max-width: 760px) {
  ol.feed li { grid-template-columns: 24px 1fr; gap: 0 var(--s-3); align-items: start; }
  ol.feed time { grid-column: 2; }
}
/* the serif lead at the body-heading size: used by billing, models, keys and usage (not by the overview any more) */
.say.sm { font-size: var(--fs-heading); }

/* first run: the standard page header (.ph), a note when an old account carried over, the steps (each a numbered
   panel with a section heading), the footer */
.welcome { max-width: 760px; margin: var(--s-3) auto 0; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); padding: var(--s-4) var(--s-5); display: grid; grid-template-columns: var(--h-sm) 1fr; gap: var(--s-4); transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.step.on { border-color: var(--accent); box-shadow: 0 0 0 var(--s-1) var(--accent-wash); }
.step-n { width: var(--h-sm); height: var(--h-sm); border-radius: 50%; display: grid; place-items: center; font: var(--f-body); font-weight: var(--w-semibold); background: var(--sunk); color: var(--ink-2); }
.step.on .step-n { background: var(--btn); color: var(--on-btn); }
.step.done .step-n { background: var(--good-wash); color: var(--good); }
.step-n .i { width: 14px; height: 14px; }
.step-b { min-width: 0; }
.step .sec-h.bare { margin: 0; padding-top: var(--s-1); }
.step-b > .form, .step-b > .row { margin-top: var(--s-4); }
.step .row { flex-wrap: wrap; }
.welcome-foot { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s-5); color: var(--ink-3); font: var(--f-small); gap: var(--s-3); flex-wrap: wrap; }
@media (max-width: 760px) { .step { grid-template-columns: 1fr; gap: var(--s-3); } }
/* no organisation yet: the first run starts in a bare shell (no switcher, search or nav), invitations first */
.shell.bare { grid-template-columns: minmax(0, 1fr); }
.shell.bare .nav, .shell.bare #switcher, .shell.bare .search, .shell.bare .crumb-sep, .shell.bare .menu-btn { display: none; }
.shell.bare .top-r { margin-left: auto; }
.start-inv { margin-bottom: var(--s-4); }
.start-list { list-style: none; margin: 0; padding: var(--s-2) var(--s-4) var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); }
.start-list li { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-m); }
.start-list .t { flex: 1; min-width: 0; }
.start-list .t b { display: block; font-weight: var(--w-semibold); }
.start-list .t small { font: var(--f-small); color: var(--ink-3); }

@media (max-width: 760px) {
  .nav-scrim { display: block; position: fixed; inset: 48px 0 0 0; background: var(--scrim); z-index: 31; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .nav-scrim.on { opacity: 1; pointer-events: auto; }
  .org-name { display: none; }
  .proj-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .kv-panel dl.kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv-panel dl.kv dd { margin-bottom: var(--s-2); }
  .top-r #theme { display: none; }
  .top { gap: 6px; padding: 0 var(--s-2); min-width: 0; }
  .switch { padding: 0 6px; min-width: 0; overflow: hidden; flex: 0 1 auto; }
  .switch .avatar { flex: none; }
  .top .mark { flex-direction: column; row-gap: 2px; font-size: var(--fs-body); align-items: flex-start; }
  .top .crumb-sep.hide-s { display: none; }
}
