/* The Meebits explorer (copied in by tools/build_site.py) with the site's name and nav added to its top bar, in
   the explorer's own type. Loaded after field.css. */
.bar--top { justify-content: flex-start; }
.bar--top .search { margin-left: auto; }
.site-name {
  font-family: var(--font-display); font-size: 27px; line-height: 1; letter-spacing: 0;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.bar--top .bar-title, .bar--top .filter { padding-left: var(--gutter); border-left: var(--line-width) solid var(--line); color: var(--ink-muted); }
.site-nav { display: flex; gap: 18px; padding-left: var(--gutter); border-left: var(--line-width) solid var(--line); }
.site-nav a {
  font-size: var(--text-sm); letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--ink-muted); text-decoration: none; white-space: nowrap; transition: color var(--fade) ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

/* The explorer's card runs the full height of the window, over the right end of both bars: the nav and Go to on
   top, Order, Look and Zoom below. On wider screens it sits between the bars instead, so they stay whole while a
   Meebit is open. Phones keep the card as a sheet from the bottom. */
@media (min-width: 641px) {
  .card { top: var(--bar-height); bottom: var(--bar-height); }
}

/* The Light switch (Night, Day), after Look. */
.sky { margin-left: 12px; }
/* With it the bar is full below 1200 px, where the hint would be cut short: the buttons stay, the hint goes. */
@media (max-width: 1199px) { .bar--bottom .hint { display: none; } }

@media (max-width: 640px) {
  .site-name { font-size: 22px; }
  .bar--top .bar-title, .site-nav a[aria-current="page"], .site-nav a[href$="#writing"], .site-nav a[href$="#contact"] { display: none; }
  /* While a filter or relatives fill the bar, the name steps aside. */
  .bar--top:has(#filter:not([hidden])) .site-name, .bar--top:has(#rel:not([hidden])) .site-name { display: none; }
  .bar--top .filter { padding-left: 0; border-left: 0; }
  /* "Go to" wrapped onto two lines beside the name; the # field says enough. Kept for screen readers. */
  .bar--top .search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .site-nav { padding-left: 12px; }
  /* One button on a phone: the other mode, Day at night and Night by day. */
  .sky [aria-pressed="true"] { display: none; }
  /* With it, the bottom bar is tightened to fit a 360 px phone. */
  .bar--bottom { gap: 8px; }
  .bar--bottom .order { margin-left: 0; }   /* no hint on a phone, so the groups spread across the bar */
  .bar--bottom .btn { padding-left: 6px; padding-right: 6px; }
}

/* Smaller phones (360 to 390 px): the name, Go to and Nightshades still fit on one line. */
@media (max-width: 400px) {
  .bar--top { gap: 10px; }
  .site-name { font-size: 19px; }
  .site-nav { padding-left: 10px; }
}
