/* =========================================================================
   More hub (#/more) — the grouped tile grid every non-tab module lives in.
   Token-driven only (var(--surface), var(--ink) …) so it is correct in light
   and dark without a single hard-coded colour.
   ========================================================================= */

.more-group { margin-bottom: var(--s-6); }
.more-group:last-of-type { margin-bottom: var(--s-5); }

.more-group-title {
  margin: 0 0 var(--s-3);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}

.more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--s-3);
}

.more-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-3);
  min-height: 116px;
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--sh-1);
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.more-tile:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--sh-2);
}
.more-tile:active { transform: translateY(0); }

.more-tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 19px;          /* only reached by a module still passing an emoji */
  line-height: 1;
}
.more-tile-icon svg { width: 22px; height: 22px; }

.more-tile-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.more-tile-title { font-size: .96rem; font-weight: 700; line-height: 1.25; }
.more-tile-desc {
  font-size: .8rem;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 500;
}

.more-tile-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}
.more-tile.has-new .more-tile-icon {
  background: color-mix(in srgb, var(--red) 14%, var(--surface));
  color: var(--red);
}

/* Dark mode: the tinted icon chip needs a lighter ink than navy-on-pale. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .more-tile-icon { color: #9dc0f0; }
}
:root[data-theme="dark"] .more-tile-icon { color: #9dc0f0; }

/* ----------------------------------------------------------------- footer */

.more-foot {
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}

.more-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--s-4);
}

.more-link {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  padding: 11px var(--s-3);
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.more-link:hover { background: var(--surface-2); }
.more-link-icon {
  display: inline-flex;
  width: 22px;
  color: var(--muted);
}

.more-fine {
  margin: var(--s-4) 0 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}

@media (min-width: 620px) {
  .more-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}
