/* Shared by the landing, every portal page, legal pages, 404 and docs entry.
   Keep page-specific layouts out of the header and brand components. */
.brand > img,
.brand__mark,
.portal-brand__mark {
  width: var(--everyv-brand-size);
  height: var(--everyv-brand-size);
  flex: 0 0 var(--everyv-brand-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: none;
}

.brand > img,
.brand__mark img,
.portal-brand__mark img {
  display: block;
  width: var(--everyv-brand-size);
  height: var(--everyv-brand-size);
  max-width: none;
  object-fit: contain;
}

.portal-header {
  min-height: 88px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 16px;
  border-bottom: 1px solid var(--portal-line);
}

.brand,
.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--ev-brand-gap);
  font-family: var(--ev-display);
  font-size: var(--ev-brand-font-size);
  font-weight: var(--ev-brand-font-weight);
  font-stretch: 100%;
  font-optical-sizing: auto;
  letter-spacing: var(--ev-brand-letter-spacing);
  line-height: 1;
  text-decoration: none;
}

.portal-brand { color: var(--ev-paper); }

/* Preserve the existing login page's Back to everyv appearance: typography,
   muted color, 3px text padding, thin border and its original hover colors.
   Only the outer hit target is enlarged; it must not move the underline. */
.portal-header__back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: #a7b0bf;
  font-family: 'Segoe UI Variable Text', 'Aptos', 'Helvetica Neue', sans-serif;
  font-size: 0.84rem;
  font-weight: 620;
  line-height: 1.6;
  text-decoration: none;
  cursor: pointer;
  transition: color 160ms ease;
}

.portal-header__back-label {
  display: block;
  border: 0;
  padding: 0;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  line-height: inherit;
  text-decoration: none;
  transition: border-color 160ms ease;
}

.portal-header__back:hover {
  color: #f5f6fb;
}

.portal-header__back:hover .portal-header__back-label {
  border-bottom-color: #f5f6fb;
}

.portal-header a:focus-visible {
  outline: 2px solid var(--portal-accent-strong);
  outline-offset: 5px;
}

.portal-breadcrumb {
  margin: 0 0 20px;
  color: var(--portal-muted);
  font-family: var(--ev-mono, monospace);
  font-size: 0.75rem;
  line-height: 1.6;
}

.portal-breadcrumb > .portal-breadcrumb__items {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: inherit;
}

.portal-breadcrumb > .portal-breadcrumb__items > li {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.portal-breadcrumb__separator { margin-inline-end: 10px; }
.portal-breadcrumb a { color: #3f2694; text-underline-offset: 3px; }

@media print {
  .portal-breadcrumb { display: none; }
}

@media (max-width: 820px) {
  .portal-header {
    min-height: 76px;
    gap: 8px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-header__back,
  .portal-header__back-label {
    transition: none;
  }
}
