/* The Launch chapter's widgets: the ⌘T Quick Launch page and Settings → Agents.
   Both are stage pages in the app, so their ground is the stage's, `--sg-bg`,
   not the rail's. Sizes are the app's own pixel values. */

.w-ql,
.w-cat {
  background: var(--sg-bg);
}

/* ---------- ⌘T: Quick Launch ---------- */

/* The bottom padding holds the hovered ⊕'s tip, which hangs below its card. */
.w-ql {
  padding: 16px 16px 44px;
}

/* `agent-launch-page.css`: the eyebrow is 9px / 1.7px tracking in the accent;
   the chord is the page's own, which opens it. */
.w-ql__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px;
  color: var(--w-accent);
  font: 600 9px / 1 var(--font-display);
  letter-spacing: 1.7px;
}

.w-ql__bar kbd {
  padding: 2px 7px;
  border: 1px solid var(--sg-hairline);
  border-radius: 6px;
  color: var(--sg-fg-dim);
  font: 500 11px / 1.4 var(--font-mono);
  letter-spacing: 0;
}

/* The context row: workspace, checkout, and the placement chip at the far
   edge — identity, not a control. */
.w-ql__context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--sg-hairline);
  font-size: 11px;
}

.w-picker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--sg-fg);
  white-space: nowrap;
}

.w-ql__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: var(--sg-fg-dim);
  white-space: nowrap;
}

.w-ql__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
  gap: 8px;
}

/* A card is one press and a quiet ⊕ on its right edge (DL-32.6). */
.w-card {
  display: flex;
  min-width: 0;
  border: 1px solid var(--sg-hairline);
  border-radius: 8px;
  background: var(--w-chrome-1);
}

.w-card__main {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
}

.w-card__main strong {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  font-size: 12px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.w-card__logo {
  width: 20px;
  height: 20px;
}

span.w-card__logo {
  display: grid;
  place-items: center;
  color: var(--sg-fg);
}

.w-card__logo svg {
  width: 18px;
  height: 18px;
}

.w-card__alt {
  position: relative;
  display: grid;
  width: 34px;
  flex: none;
  place-items: center;
  border-left: 1px solid var(--sg-hairline);
  color: var(--sg-fg-dim);
}

.w-card__alt .w-icon {
  color: inherit;
}

.w-card__alt.is-hovered {
  border-radius: 0 7px 7px 0;
  background: var(--sg-hairline);
  color: var(--sg-fg);
}

/* The hover tip the app raises below a ⊕ after 400ms (`NewSpaceTip`). */
.w-tip {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--sg-chrome-2);
  box-shadow: inset 0 0 0 1px var(--sg-hair-strong);
  color: var(--sg-fg-dim);
  font-size: 10.5px;
  line-height: 1.2;
  white-space: nowrap;
}

/* ---------- Settings → Agents ---------- */

.w-cat {
  padding: 8px 6px 10px;
}

/* `.lp-head`: the list's title in the muted ink, its count a quiet pill. */
.w-cat__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 10px 6px;
}

.w-cat__head span:first-child {
  color: var(--sg-fg-dim);
  font-size: 14px;
  font-weight: 560;
}

.w-cat__head span:last-child {
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--sg-chrome-2);
  color: var(--sg-fg-faint);
  font-size: 11px;
}

.w-cat__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
}

.w-cat__row + .w-cat__row {
  border-top: 1px solid rgb(255 255 255 / 6%);
}

.w-cat__text {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.w-cat__name {
  font-size: 12.5px;
  font-weight: 600;
}

/* `.lp-command`: UI font, not mono (DL-4.1); a long command wraps rather than
   push the row's controls off the edge. */
.w-cat__cmd {
  color: var(--sg-fg);
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.w-cat__flags {
  color: var(--sg-fg-faint);
}

/* Three of nine Available rows: the list runs on past the card's edge. */
.w-cat__more {
  position: relative;
  max-height: 8.5rem;
  overflow: hidden;
  mask-image: linear-gradient(#000 55%, transparent);
}
