/* Header, badges, avatars and the ask button */
/* One row on wide screens. A long project name shortens with an ellipsis,
   so the pages, alerts and account never wrap under it. */
.site-header { max-width: var(--page); margin: 0 auto; padding: 28px var(--gutter); display: flex; flex-wrap: nowrap; align-items: center; gap: 16px 32px; }
.site-header__logo, .nav, .pill, .account { flex: none; }
.site-header--focused { justify-content: space-between; }
.logo { height: 24px; width: auto; display: block; }
.site-header__project { flex: 1 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft); text-decoration: none; }
.site-header__project-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-header__project svg { flex: none; }
.nav { display: flex; gap: 28px; font-family: var(--mono); font-size: 13px; }
.nav__link { text-decoration: none; color: var(--ink-faint); padding-bottom: 4px; }
.nav__link[aria-current="page"] { color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--ink); }

.pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px; border-radius: 999px; font-size: 13px; font-weight: 500; text-decoration: none; }
.pill--alert { background: var(--red-wash); color: var(--red-ink); }
.pill--alert:hover { color: var(--red-ink); }
.dot { width: 7px; height: 7px; border-radius: 999px; background: var(--red); flex: none; }
.dot--green { background: var(--green); }

.chip { font-family: var(--mono); display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; align-self: flex-start; }
.chip__dot { width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.chip--on-track { background: var(--green-wash); color: var(--green-ink); }
.chip--on-track .chip__dot { background: var(--green); }
.chip--at-risk { background: var(--amber-wash); color: var(--amber-ink); }
.chip--at-risk .chip__dot { background: var(--amber); }
.chip--off-track, .chip--alert { background: var(--red-wash); color: var(--red-ink); }
.chip--off-track .chip__dot, .chip--alert .chip__dot { background: var(--red); }
.chip--paused { background: var(--line); color: #4a3a38; }

.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; letter-spacing: 0; }
.new-badge { font-family: var(--mono); font-weight: 700; display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 2px; }

.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #eae6e4; color: var(--ink-soft); font-weight: 600; flex: none; object-fit: cover; }
.avatar--tiny { width: 28px; height: 28px; font-size: 10px; }
.avatar--small { width: 30px; height: 30px; font-size: 11px; }
.avatar--medium { width: 36px; height: 36px; font-size: 12px; }
.avatar--large { width: 48px; height: 48px; font-size: 14px; }
.avatar--more { background: var(--ink); color: var(--paper); }
.avatar--ask { width: 40px; height: 40px; font-size: 13px; background: #4a3c3a; color: var(--paper); }

.account { position: relative; }
.account summary { list-style: none; cursor: pointer; }
.account summary::-webkit-details-marker { display: none; }
.account__menu { position: absolute; right: 0; top: 40px; z-index: 20; min-width: 220px; padding: 16px; display: flex; flex-direction: column; gap: 4px; background: #fff; border-radius: 14px; box-shadow: 0 12px 32px rgba(32, 19, 19, 0.12); }
.account__menu form { margin-top: 10px; }

/* Ask the delivery lead */
.ask { position: fixed; right: 32px; bottom: 32px; z-index: 10; display: inline-flex; align-items: center; gap: 12px; height: 56px; padding: 0 24px 0 8px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; box-shadow: 0 10px 30px rgba(32, 19, 19, 0.22), 0 2px 6px rgba(32, 19, 19, 0.12); }
.ask:hover { color: #fff; }
.ask__face { position: relative; display: flex; flex: none; }
.ask__badge { position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; padding: 3px; border-radius: 999px; background: #fff; }
.ask__text { display: flex; flex-direction: column; line-height: 1.25; }
.ask__title { font-size: 14px; font-weight: 500; }
.ask__hint { font-size: 12px; color: var(--line-strong); }

@media (max-width: 1080px) {
  /* Too narrow for everything on one line, so the project name gets its own
     row under the logo, pages, alerts and account. */
  .site-header { flex-wrap: wrap; }
  .site-header__logo { margin-right: auto; }
  .site-header__project { order: 5; flex: 1 0 100%; }
}

@media (max-width: 760px) {
  /* Logo, alerts and account on top, then the project, then its pages in a
     row that scrolls sideways when they don't all fit. */
  .site-header { gap: 12px 16px; padding-top: 20px; padding-bottom: 20px; }
  .site-header__logo { margin-right: auto; }
  .site-header__project { order: 5; flex: 1 0 100%; min-width: 0; }
  .nav { order: 6; flex: 1 0 100%; gap: 24px; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 2px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav__link { white-space: nowrap; }
  /* Logo, alerts and account stay on one line, however narrow. */
  .pill, .account { flex: none; white-space: nowrap; }
}

@media (max-width: 480px) {
  /* "2 need you" instead of "2 things need you", so the top row fits. */
  .pill__long { display: none; }
}

@media (max-width: 560px) {
  .ask { right: 16px; bottom: 16px; }
}
.account__link { margin-top: 10px; text-decoration: none; }
