.site-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hub-auth {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

.hub-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.35);
}


.hub-auth-btn {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

/* Author display rules beat the UA [hidden] style; keep hidden buttons hidden. */
.hub-auth-btn[hidden] {
  display: none;
}

.hub-auth-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hub-auth-btn-muted {
  font-weight: 500;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.hub-login-hint {
  margin-top: 20px;
  padding: 12px 14px;
  background: #eef3f8;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.tools li.is-locked a {
  opacity: 0.55;
}

/* Picture + "Signed in as …" = link to My account (no href while signed out). */
.hub-me {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  border-radius: 18px;
  padding: 2px 10px 2px 2px;
}
.hub-me[href]:hover,
.hub-me[href]:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}
.hub-me[href]:hover .hub-auth-status { text-decoration: underline; }
.hub-avatar[hidden] { display: none; }
.hub-avatar-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  box-sizing: border-box;
}

/* Hub index: tool cards in a responsive grid (several per row on wide screens, one on phones).
   Scoped to the hub — common.css `main` / `.tools` stay unchanged for the other pages. */
/* Same side margins as the header (8vw), so the cards line up with "KYCR Tools". */
.hub-main {
  max-width: none;
  margin: 0;
}

.hub-main .tools {
  /* Fallback until hub.js balances the rows (same card width as the balanced grid). */
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

/* Balanced rows (hub.js balanceGrid): --hub-cols columns fit the page, this section uses
   --sec-cols of them; cards keep the width of one --hub-cols column in every section. */
.hub-main .tools.is-balanced {
  grid-template-columns: repeat(
    var(--sec-cols),
    calc((100% - (var(--hub-cols) - 1) * 14px) / var(--hub-cols))
  );
}

.hub-main .tools li {
  display: flex;
}

.hub-main .tools a {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 132px;
}

/* URL pinned to the card bottom so cards in a row line up. */
.hub-main .tools .url {
  margin-top: auto;
  padding-top: 10px;
}
