.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 78px;
  padding: .8rem max(1.25rem, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid rgb(233 226 231 / 80%);
  background: rgb(255 254 253 / 94%);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink, #2b1230); text-decoration: none; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 13px; background: var(--plum, #6b1f4e); color: #fff; font-family: var(--display, Georgia, serif); font-size: 1.5rem; font-weight: 700; box-shadow: 0 5px 13px rgb(107 31 78 / 20%); }
.brand-name { display: block; font-family: var(--display, var(--display, Georgia, serif)); font-size: 1.35rem; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.brand-caption { display: block; margin-top: .18rem; color: var(--muted, #6f6170); font-size: .58rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.pilot-label { display: inline-flex; align-items: center; gap: .45rem; margin-left: auto; color: var(--ink-soft, #55465a); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.pilot-label::before { width: 7px; height: 7px; border-radius: 50%; background: var(--brass, #b8903c); content: ""; }
.header-nav { display: flex; align-items: center; gap: .25rem; }
.header-link { display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 40px; padding: .5rem .72rem; border-radius: 9px; color: var(--ink-soft, #55465a); font-size: .86rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.header-link:hover { background: var(--plum-wash, #f6edf3); color: var(--plum, #6b1f4e); }
.header-link-primary { margin-left: .25rem; padding-inline: 1rem; background: var(--plum, #6b1f4e); color: #fff; }
.header-link-primary:hover { background: var(--plum-deep, #4e1438); color: #fff; }
.header-admin-link { background: var(--plum-wash, #f6edf3); color: var(--plum, #6b1f4e); font-weight: 750; }
.header-admin-link:hover { background: #eadbe5; }
.header-signout-form { margin: 0; }
.workspace-switch-form { display: inline-flex; align-items: center; gap: .45rem; margin: 0 .35rem; padding: .36rem .65rem; border: 1px solid var(--line, #eadfe6); border-radius: 99px; background: #fffefd; box-shadow: 0 2px 7px rgb(41 24 38 / 4%); }
.workspace-label { color: var(--muted, #6f6170); font-size: .7rem; font-weight: 650; transition: color .18s ease; }
.workspace-label.is-current { color: var(--plum, #6b1f4e); }
.workspace-toggle { display: inline-flex; flex: 0 0 38px; width: 38px; min-width: 38px; min-height: 22px; height: 22px; align-items: center; padding: 2px; border: 1px solid #cbbbc7; border-radius: 99px; background: #eadfe6; box-shadow: none; cursor: pointer; line-height: 1; }
.workspace-toggle span { width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(33 25 35 / 24%); transition: transform .18s ease; }
.workspace-toggle.is-owner { justify-content: flex-end; border-color: var(--plum, #6b1f4e); background: var(--plum, #6b1f4e); }
.workspace-toggle:hover { transform: none; box-shadow: 0 0 0 3px rgb(107 31 78 / 10%); }
.workspace-toggle:focus-visible { outline-offset: 3px; }
button.header-signout { min-height: 40px; padding: .5rem .72rem; border-color: transparent; border-radius: 9px; background: transparent; color: var(--ink-soft, #55465a); font-size: .86rem; font-weight: 600; }
button.header-signout:hover { transform: none; border-color: var(--line, #eadfe6); background: #fff; box-shadow: none; color: var(--plum, #6b1f4e); }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding: 1.5rem max(1.5rem, calc((100vw - 1240px) / 2)); border-top: 1px solid var(--line, #eadfe6); background: #f5f1f4; color: var(--muted, #6f6170); font-size: .82rem; }
.footer-brand { color: var(--plum, #6b1f4e); font-family: var(--display, Georgia, serif); font-size: 1rem; font-weight: 700; }
.footer-copyright { flex-basis: 100%; padding-top: .75rem; border-top: 1px solid var(--line, #eadfe6); font-size: .75rem; }

.menu-toggle { display: none; }

/* Tablets and phones: brand, city and a Menu button on one line; the links open as a tidy list. */
@media (max-width: 1180px) {
  .site-header { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .55rem .9rem; padding: calc(.7rem + 5px) 1.2rem .7rem; }
  .brand { grid-column: 1; grid-row: 1; min-width: 0; }
  .pilot-label { grid-column: 2; grid-row: 1; margin: 0; }
  .site-header .menu-toggle { display: inline-flex; grid-column: 3; grid-row: 1; align-items: center; gap: .55rem; min-height: 42px; padding: .5rem .9rem; border: 1px solid var(--line, #eadfe6);
    border-radius: 999px; background: #fff; color: var(--plum, #6b1f4e); font: 700 .88rem/1 var(--body, system-ui, sans-serif); cursor: pointer; box-shadow: none; }
  .site-header .menu-toggle:hover, .site-header .menu-toggle:focus, .site-header .menu-toggle:active, .site-header.is-open .menu-toggle {
    border-color: var(--plum, #6b1f4e); background: var(--plum-wash, #f6edf3); color: var(--plum, #6b1f4e); transform: none; box-shadow: none; filter: none; opacity: 1; }
  .menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 16px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
  .menu-bars { position: relative; }
  .menu-bars::before, .menu-bars::after { position: absolute; left: 0; content: ""; }
  .menu-bars::before { top: -5px; } .menu-bars::after { top: 5px; }
  .is-open .menu-bars { background: transparent; }
  .is-open .menu-bars::before { transform: translateY(5px) rotate(45deg); }
  .is-open .menu-bars::after { transform: translateY(-5px) rotate(-45deg); }
  .header-nav { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; width: 100%; gap: .3rem; }
  .has-menu .header-nav { display: none; }
  .has-menu.is-open .header-nav { display: flex; flex-direction: column; align-items: stretch; padding: .5rem 0 .4rem; border-top: 1px solid var(--line, #eadfe6); }
  .has-menu.is-open .header-link, .has-menu.is-open .header-switch, .has-menu.is-open .header-signout-form, .has-menu.is-open button.header-signout { width: 100%; justify-content: flex-start; margin: 0; }
  .has-menu.is-open .header-link { min-height: 46px; padding: .6rem .8rem; font-size: .98rem; }
  .has-menu.is-open .header-link-primary { justify-content: center; margin-top: .3rem; }
  .has-menu.is-open .header-switch { min-height: 46px; margin-top: .3rem; padding: .6rem .9rem; font-size: .95rem; }
}

@media (max-width: 700px) {
  .site-header { min-height: 64px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .brand-name { font-size: 1.2rem; }
  .brand-caption { font-size: .52rem; }
  .site-footer { align-items: flex-start; flex-direction: column; padding: 1.25rem 1rem; }
}

@media (max-width: 420px) {
  .site-header { gap: .55rem .6rem; padding-inline: 1rem; }
  .pilot-label { display: none; }
}

/* Nine-thread navarasa band, shared with the onboarding site */
.site-header::before { position: absolute; top: 0; right: 0; left: 0; height: 5px; content: "";
  background: linear-gradient(90deg, #c3243f 0 11.11%, #f08a24 0 22.22%, #e2a91c 0 33.33%, #3d8b4a 0 44.44%, #0e7c86 0 55.55%, #2f3e8f 0 66.66%, #d23c8e 0 77.77%, #2b1230 0 88.88%, #b8903c 0 100%); }
.site-header { padding-top: calc(.8rem + 5px); }
.brand-mark { font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; font-weight: 600; }
.brand-name { font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; font-weight: 600; letter-spacing: -.01em; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.footer-links a { color: inherit; }
