.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 2px solid var(--line);
}

.app-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.6rem 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  font: 700 1.25rem/1 var(--font-display);
  text-decoration: none;
}

.brand:hover { color: var(--ink); }
.brand-mark { width: 38px; height: 27px; flex: none; transition: transform 160ms ease; }
.brand-mark__card { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.brand-mark__band { fill: var(--accent); stroke: var(--ink); stroke-width: 2; }
.brand-mark__line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand:hover .brand-mark { transform: rotate(-6deg); }

/* Header menus: <details> that drop a panel below their summary. */
.dropdown { position: relative; }
.dropdown summary { cursor: pointer; list-style: none; }
.dropdown summary::-webkit-details-marker { display: none; }

.dropdown__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 20;
  display: grid;
  min-width: 15rem;
  max-width: calc(100vw - 32px);
  padding: 0.4rem;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-pop);
}

.dropdown__menu--end { left: auto; right: 0; min-width: 11rem; }

.dropdown__menu a {
  display: grid;
  padding: 0.5em 0.7em;
  border-radius: var(--radius-soft);
  color: var(--ink);
  text-decoration: none;
}

.dropdown__menu a:hover { background: var(--paper); }
.dropdown__menu a[aria-current="page"] { background: var(--accent-pale); }
.dropdown__menu hr { width: 100%; margin: 0.3rem 0; border: 0; border-top: 2px solid var(--line); }

.dropdown__heading {
  margin: 0.3rem 0.7em 0.1rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* The team name opens the team switcher. */
.team-switcher__caret { font-size: 0.8rem; color: var(--ink-soft); }

/* The hamburger at the far right holds the account pages. */
.account-menu summary {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-pill);
  color: var(--ink);
}

.account-menu summary:hover { background: var(--paper); }
.account-menu:has([aria-current="page"]) summary { background: var(--accent-pale); }
.account-menu summary svg { width: 1.25rem; height: 1.25rem; }

.app-nav {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.app-nav a {
  position: relative;
  padding: 0.4em 0.8em;
  border-radius: var(--radius-pill);
  color: var(--ink);
  font: 600 0.95rem/1.2 var(--font-display);
  text-decoration: none;
  white-space: nowrap;
}

.app-nav a:hover { background: var(--paper); }
.app-nav a[aria-current="page"] { background: var(--accent-pale); }

.app-nav__dot {
  position: absolute;
  top: 0.25em;
  right: 0.3em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.75rem 16px 4rem;
}

.page--narrow { max-width: 720px; }

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.page-head h1 { margin: 0; }

.sheet {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-blob);
  padding: clamp(1.1rem, 3vw, 1.75rem);
}

.sheet + .sheet { margin-top: 1.25rem; }

/* Public pages: centred and roomy, with a stick figure front and centre. */
.public {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 2rem 16px;
}

.public__card {
  width: min(100%, 460px);
  text-align: center;
}

.public__card .sheet { text-align: left; }
.public__card > .figure { width: 112px; height: 112px; margin-bottom: 0.25rem; }

.site-footer {
  margin-top: 2rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-align: center;
}

.site-footer a { color: inherit; }

.sign-out { margin-left: 0.5rem; }

@media (max-width: 720px) {
  .app-header__inner { flex-wrap: wrap; row-gap: 0.4rem; }
  .sign-out { margin-left: auto; }
  .app-nav { order: 3; width: 100%; margin: 0 -0.8em; }
}
