/* Site chrome rendered by theme.qtpl: the page shell and its header. Every
   page that goes through the theme links this file, so a page stylesheet
   only adds what differs for that page. */

.shell {
  width: min(var(--layout-max), 100%);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-7);
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  border-radius: var(--radius-sm);
}

.brand img {
  display: block;
  width: auto;
  height: clamp(2.375rem, 5vw, 3.25rem);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-1);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
  padding: 0 var(--space-3);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  border-color: var(--border);
  background: var(--surface-subtle);
  color: var(--text);
}

@media (max-width: 40rem) {
  .topbar { align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-5); }
  .site-nav { gap: 0; }
  .site-nav a { min-height: 2.75rem; padding: 0 var(--space-2); font-size: 0.875rem; }
}

/* The brand already links home; drop the duplicate where the nav would wrap. */
@media (max-width: 430px) {
  .site-nav a:first-child { display: none; }
}
