/*
 * The Mind-sites menu behind the logo in the header (2026-11-18): the same
 * menu the five Mind sites have (creatine repo, web/src/components/MindsNav.tsx),
 * in this site's colours. The menu is a <details>, so it opens without script;
 * /assets/minds-nav.js adds closing on Escape or a click elsewhere, and the
 * Brain Health Cycle picture as a dialog.
 *
 * It lives in its own file rather than site.css because /assets/* is cached
 * for a year (_headers): a returning visitor would otherwise get the new
 * header markup with an old, cached site.css.
 */
.brand-name { color: inherit; text-decoration: none; }

.minds { position: relative; flex: none; font-size: var(--step-0); font-weight: 400; }
.minds-btn { display: block; list-style: none; cursor: pointer; line-height: 0; border-radius: 0.6rem; }
.minds-btn::-webkit-details-marker { display: none; }
.minds-btn img { display: block; width: 2.5rem; height: 2.5rem; border-radius: 0.6rem; }
.minds-btn:hover, .minds[open] > .minds-btn { outline: 2px solid var(--link); outline-offset: 2px; }

/* The menu floats over the page: it takes no room in the header row. */
.minds-menu {
  position: absolute; z-index: 20; top: calc(100% + 0.5rem); left: 0;
  width: max-content; max-width: min(46rem, calc(100vw - 2.5rem));
  margin: 0; padding: 0.4rem; list-style: none;
  display: grid; grid-template-columns: auto auto 1fr; column-gap: 1rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 0.75rem; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
/* Rows share the menu's three columns so the domains line up. */
.minds-row { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; padding: 0.4rem 0.5rem; border-radius: 0.5rem; }
.minds-logo { display: block; width: 2.5rem; height: 2.5rem; object-fit: cover; border-radius: 0.5rem; }
.minds-domain { font-weight: 700; white-space: nowrap; text-decoration: none; }
.minds-domain:hover { text-decoration: underline; }
.minds-desc { font-size: 0.95rem; line-height: 1.4; color: var(--muted); }
.minds-foot { margin-top: 0.25rem; border-top: 1px solid var(--line); border-radius: 0; padding-top: 0.6rem; }
@media (max-width: 640px) {
  .minds-menu { grid-template-columns: auto 1fr; }
  .minds-row { column-gap: 1rem; }
  .minds-desc { grid-column: 2; }
}

/* The Brain Health Cycle picture, opened from the last row of the menu. */
.cycle-dialog { width: min(34rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; padding: 1.25rem; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--surface); color: var(--text); }
.cycle-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.cycle-dialog h2 { font-size: var(--step-1); margin-bottom: 0.75rem; }
/* The picture is square: on a short window it shrinks so the title and the Close button stay in view. */
.cycle-dialog img { display: block; width: auto; height: auto; max-width: 100%; max-height: 60vh; margin: 0 auto 1rem; border-radius: 0.75rem; }
.cycle-dialog p { color: var(--muted); }
.cycle-close { font: inherit; font-weight: 700; color: var(--text); background: var(--button); border: 0; border-radius: 0.5rem; padding: 0.55rem 1.1rem; cursor: pointer; }
.cycle-close:hover { background: var(--button-hover); }
