:root {
  --content-width: 940px;
  --topbar-height: 56px;
  --brand-size: 24px;
}

.header-inner, .main {
  width: min(var(--content-width), calc(100% - 48px));
  margin: 0 auto;
}
.site-header { border-bottom: 1px solid var(--line); }
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: var(--topbar-height);
}
.brand { display: flex; align-items: center; gap: 6px; }
.brand-symbol { width: var(--brand-size); height: var(--brand-size); }
.brand-name { font-size: 21px; font-weight: 750; letter-spacing: -1px; }
.brand-dot { color: var(--accent); }
.navigation { display: flex; align-self: stretch; gap: 22px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.nav-item:hover, .nav-item[aria-current="page"] { color: var(--ink); }
.nav-item[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--accent);
}
.profile-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--small-lift);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}
.profile-avatar:hover { background: var(--accent-soft); }
.profile-appearance {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.mood-switch { display: flex; flex-wrap: wrap; gap: 2px; }
.mood {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 9px;
}
.mood:hover { background: var(--well); }
.mood[aria-pressed="true"] { color: var(--ink); }
.swatch { width: 9px; height: 9px; border-radius: 50%; }
.swatch-ember { background: #b96040; }
.swatch-bonbon { background: #cd6ca6; }
.swatch-afterglow { background: #645a78; }
.mood[aria-pressed="true"] .swatch {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}
.main { padding-top: 62px; padding-bottom: 24px; }
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 28px;
}
.page-heading h1 { font-size: 28px; font-weight: 600; letter-spacing: -.8px; }
.total {
  margin-left: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}
.page-heading .primary {
  min-height: 38px;
  padding: 8px 14px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .header-inner { gap: 20px; }
  .navigation { gap: 18px; }
}
@media (max-width: 700px) {
  .main { padding-top: 40px; }
}
@media (max-width: 600px) {
  .header-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0 12px;
    padding-top: 8px;
  }
  .brand-name { font-size: 20px; }
  .global-search { grid-column: 2; grid-row: 1; }
  .profile-avatar { grid-column: 3; grid-row: 1; }
  .navigation { grid-column: 1 / -1; grid-row: 2; gap: 22px; }
  .nav-item { min-height: 38px; font-size: 12px; }
}
@media (max-width: 520px) {
  .header-inner, .main { width: calc(100% - 40px); }
  .page-heading { gap: 10px; margin-bottom: 24px; }
  .page-heading h1 { font-size: 23px; }
  .page-heading .primary { padding: 8px 11px; font-size: 11px; }
  .total { font-size: 11px; margin-left: 3px; }
}
