.study-brand {
  --study-forest: #0d4f45;
  --study-amber: #f9b023;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #172c2c;
  font-size: 0.96rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
}
.study-brand-mark {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 34px;
  flex: 0 0 38px;
}
.study-brand-bars {
  position: absolute;
  top: 1px;
  left: 1px;
  display: flex;
  align-items: end;
  gap: 3px;
  height: 26px;
  transform: skewY(-14deg);
}
.study-brand-bars i {
  display: block;
  width: 6px;
  height: 10px;
  border-radius: 1px;
  background: var(--study-forest);
}
.study-brand-bars i:nth-child(2) { height: 17px; }
.study-brand-bars i:nth-child(3) { height: 24px; }
.study-brand-glasses {
  position: absolute;
  right: 0;
  bottom: 1px;
  display: flex;
  gap: 4px;
  align-items: center;
  color: #172c2c;
}
.study-brand-glasses::before {
  position: absolute;
  left: 12px;
  width: 5px;
  height: 2px;
  background: currentColor;
  content: "";
}
.study-brand-glasses i {
  box-sizing: border-box;
  width: 13px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 5px 5px 6px 6px;
  background: var(--study-amber);
}
header nav a.study-portfolio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #1c1b19;
  min-height: 36px;
  padding: 3px 10px 3px 4px;
  border: 1px solid #e5c47b;
  border-radius: 999px;
  background: #faf4e6;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}
header nav a.study-portfolio:hover { background: #fff1d6; }
header nav a.study-portfolio:focus-visible,
header a.study-brand:focus-visible {
  outline: 3px solid #895006;
  outline-offset: 3px;
}
.study-portfolio img {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
@media (max-width: 1040px) {
  header .mastin, header .top { flex-wrap: wrap; }
  header nav { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  header .study-brand { white-space: normal; }
  header .mastin, header .top { gap: 0.45rem; }
}

html:has(.mast .study-brand) {
  scroll-padding-top: 3.25rem;
}

.mast {
  --report-brand-row-height: 44px;
  top: calc(-1 * var(--report-brand-row-height));
}

.mast .mastin {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--report-brand-row-height) auto;
  align-items: stretch;
  gap: 0;
  min-height: 0;
  padding-block: 0;
}

.mast .study-brand {
  justify-self: start;
  white-space: normal;
}

.mast .study-brand-mark {
  transform: scale(.86);
  transform-origin: left center;
}

.mast .mastin nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(.75rem, 2vw, 1.65rem);
  min-width: 0;
  min-height: 38px;
  padding: 3px 4px;
  border-top: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
}

.mast .mastin nav a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 30px;
  padding-block: 4px;
  white-space: nowrap;
}

.mast .mastin nav a:focus-visible {
  outline-offset: 1px;
}

.mast .mastin nav a.study-portfolio {
  margin-inline-start: auto;
  padding: 2px 8px 2px 4px;
  min-height: 30px;
}

.mast .study-portfolio img {
  width: 22px;
  height: 22px;
}
