/* The header shared by the application and the administration: brand, navigation, account chip.

   One markup and one stylesheet for both shells (tectum/templates/tectum/header.html); only the logout
   URL of the account menu differs. Colours and radii come from tokens.css. */
.header {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem;
  padding: .75rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line);
}
.header .brand { font-weight: 700; font-size: 1.2rem; text-decoration: none; color: var(--text); }
.header nav { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; flex: 1; }
/* navigation reads as a row of buttons: quiet until hovered, filled for the current page */
.header nav a {
  padding: .4rem .85rem; border-radius: var(--radius); color: var(--muted); font-weight: 500;
  text-decoration: none; transition: background-color .15s ease, color .15s ease;
}
.header nav a:hover, .header nav a:focus-visible { color: var(--accent-dark); background: var(--accent-soft); }
.header nav a[aria-current="page"] { color: var(--on-accent); background: var(--accent); font-weight: 600; }
.header .account { margin-left: auto; }
/* The administration colours every link with its own palette; the chip and its menu keep the text colour. */
.header .account-chip { color: var(--text); }
.header .account .menu-item { color: var(--text); }

/* Phones (on site): header in two rows; the name is in the menu under "Profil" */
@media (max-width: 40rem) {
  .header { padding: .5rem 1rem; gap: .25rem .75rem; }
  .header .account-chip .name { display: none; }
  .header nav { order: 3; flex-basis: 100%; flex-wrap: wrap; }
  .header nav a { padding: .35rem .7rem; }
}

/* Print: protocols and lists on paper keep no navigation */
@media print {
  .header { display: none; }
}
